org.databene.benerator.distribution
Class WeightedDoubleGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.primitive.number.AbstractNumberGenerator<java.lang.Double>
          extended by org.databene.benerator.distribution.WeightedDoubleGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.Double>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class WeightedDoubleGenerator
extends AbstractNumberGenerator<java.lang.Double>

Double Generator that supports a weight function.

Created: 11.06.2006 21:33:41

Since:
0.1
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.primitive.number.AbstractNumberGenerator
generatedType, max, min, precision
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
WeightedDoubleGenerator()
           
WeightedDoubleGenerator(double min, double max, double precision, WeightFunction function)
           
 
Method Summary
 java.lang.Double generate()
          Returns an instance of the generic type E.
 Distribution getDistribution()
           
 void init(GeneratorContext context)
           
 
Methods inherited from class org.databene.benerator.primitive.number.AbstractNumberGenerator
getGeneratedType, getMax, getMin, getPrecision, isParallelizable, isThreadSafe, setMax, setMin, setPrecision
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, close, reset, toString, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeightedDoubleGenerator

public WeightedDoubleGenerator()

WeightedDoubleGenerator

public WeightedDoubleGenerator(double min,
                               double max,
                               double precision,
                               WeightFunction function)
Method Detail

getDistribution

public Distribution getDistribution()

init

public void init(GeneratorContext context)
Specified by:
init in interface Generator<java.lang.Double>
Overrides:
init in class AbstractNumberGenerator<java.lang.Double>

generate

public java.lang.Double generate()
                          throws IllegalGeneratorStateException
Description copied from interface: Generator
Returns an instance of the generic type E.

Throws:
IllegalGeneratorStateException


Copyright © 2011. All Rights Reserved.