org.databene.benerator.distribution.sequence
Class CumulatedLongGenerator

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.sequence.CumulatedLongGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.Long>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

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

Long Generator that implements a 'cumulated' Long Sequence. Uniqueness cannot be supported since it contradicts the purpose of this generator.

Created: 07.06.2006 19:33:37

Since:
0.1
Author:
Volker Bergmann

Field Summary
static long DEFAULT_MAX
           
static long DEFAULT_MIN
           
 
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
CumulatedLongGenerator()
           
CumulatedLongGenerator(long min, long max)
           
CumulatedLongGenerator(long min, long max, long precision)
           
 
Method Summary
 float average()
           
 java.lang.Long generate()
          Returns an instance of the generic type E.
 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
 

Field Detail

DEFAULT_MAX

public static final long DEFAULT_MAX
See Also:
Constant Field Values

DEFAULT_MIN

public static final long DEFAULT_MIN
See Also:
Constant Field Values
Constructor Detail

CumulatedLongGenerator

public CumulatedLongGenerator()

CumulatedLongGenerator

public CumulatedLongGenerator(long min,
                              long max)

CumulatedLongGenerator

public CumulatedLongGenerator(long min,
                              long max,
                              long precision)
Method Detail

average

public float average()

generate

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


init

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


Copyright © 2011. All Rights Reserved.