org.databene.benerator.distribution.sequence
Class RandomWalkLongGenerator

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

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

Long Generator that implements a 'randomWalk' Long Sequence.

Created: 13.06.2006 07:36:45

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
RandomWalkLongGenerator()
           
RandomWalkLongGenerator(long min, long max)
           
RandomWalkLongGenerator(long min, long max, long minIncrement, long maxIncrement)
           
RandomWalkLongGenerator(long min, long max, long precision, long initial, long minIncrement, long maxIncrement)
           
RandomWalkLongGenerator(long min, long max, long precision, long initial, long minIncrement, long maxIncrement, Distribution incrementDistribution)
           
 
Method Summary
 void close()
          Closes the generator.
 java.lang.Long generate()
          Returns an instance of the generic type E.
 long getNext()
           
 void init(GeneratorContext context)
           
 void reset()
           
 void setNext(long next)
           
 
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, toString, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RandomWalkLongGenerator

public RandomWalkLongGenerator()

RandomWalkLongGenerator

public RandomWalkLongGenerator(long min,
                               long max)

RandomWalkLongGenerator

public RandomWalkLongGenerator(long min,
                               long max,
                               long minIncrement,
                               long maxIncrement)

RandomWalkLongGenerator

public RandomWalkLongGenerator(long min,
                               long max,
                               long precision,
                               long initial,
                               long minIncrement,
                               long maxIncrement)

RandomWalkLongGenerator

public RandomWalkLongGenerator(long min,
                               long max,
                               long precision,
                               long initial,
                               long minIncrement,
                               long maxIncrement,
                               Distribution incrementDistribution)
Method Detail

getNext

public long getNext()

setNext

public void setNext(long next)

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()
Description copied from interface: Generator
Returns an instance of the generic type E.


reset

public void reset()
Specified by:
reset in interface org.databene.commons.Resettable
Overrides:
reset in class AbstractGenerator<java.lang.Long>

close

public void close()
Description copied from interface: Generator
Closes the generator. After invocation the state is unavailable.

Specified by:
close in interface java.io.Closeable
Specified by:
close in interface Generator<java.lang.Long>
Overrides:
close in class AbstractGenerator<java.lang.Long>


Copyright © 2011. All Rights Reserved.