org.databene.benerator.distribution
Class WeightedLongGenerator

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

public class WeightedLongGenerator
extends AbstractNumberGenerator<java.lang.Long>

Long Generator that supports a weight function.

Created: 18.06.2006 15:00: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
WeightedLongGenerator()
           
WeightedLongGenerator(long min, long max)
           
WeightedLongGenerator(long min, long max, long precision)
           
WeightedLongGenerator(long min, long max, long precision, WeightFunction function)
           
WeightedLongGenerator(long min, long max, WeightFunction function)
           
 
Method Summary
 java.lang.Long generate()
          Returns an instance of the generic type E.
 Distribution getDistribution()
           
 void init(GeneratorContext context)
           
 void setDistribution(Distribution distribution)
           
 
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

WeightedLongGenerator

public WeightedLongGenerator()

WeightedLongGenerator

public WeightedLongGenerator(long min,
                             long max)

WeightedLongGenerator

public WeightedLongGenerator(long min,
                             long max,
                             long precision)

WeightedLongGenerator

public WeightedLongGenerator(long min,
                             long max,
                             WeightFunction function)

WeightedLongGenerator

public WeightedLongGenerator(long min,
                             long max,
                             long precision,
                             WeightFunction function)
Method Detail

getDistribution

public Distribution getDistribution()

setDistribution

public void setDistribution(Distribution distribution)

init

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

generate

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

Throws:
IllegalGeneratorStateException


Copyright © 2011. All Rights Reserved.