org.databene.benerator.wrapper
Class SkipGeneratorProxy<E>

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<P>
      extended by org.databene.benerator.wrapper.GeneratorWrapper<E,E>
          extended by org.databene.benerator.wrapper.GeneratorProxy<E>
              extended by org.databene.benerator.wrapper.SkipGeneratorProxy<E>
All Implemented Interfaces:
java.io.Closeable, Generator<E>, Resettable, ThreadAware

public class SkipGeneratorProxy<E>
extends GeneratorProxy<E>

This forwards a source generator's products. Iterates through the products of another generator with a variable step width. This is intended mainly for use with importing generators that provide data volumes too big to keep in RAM.

Created: 26.08.2006 16:16:04

Since:
0.1
Author:
Volker Bergmann

Field Summary
static long DEFAULT_MAX_INCREMENT
           
static long DEFAULT_MIN_INCREMENT
           
 
Fields inherited from class org.databene.benerator.wrapper.GeneratorWrapper
source
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
SkipGeneratorProxy()
           
SkipGeneratorProxy(Generator<E> source)
          Initializes the generator to iterate with increment 1
SkipGeneratorProxy(Generator<E> source, java.lang.Long minIncrement, java.lang.Long maxIncrement)
          Initializes the generator to use a random increment of uniform distribution
SkipGeneratorProxy(Generator<E> source, java.lang.Long minIncrement, java.lang.Long maxIncrement, Distribution incrementDistribution)
          Initializes the generator to use a random increment of uniform distribution
SkipGeneratorProxy(java.lang.Long minIncrement, java.lang.Long maxIncrement)
           
 
Method Summary
 void close()
          Closes the generator.
 E generate()
          Returns an instance of the generic type E.
 void init(GeneratorContext context)
           
 void reset()
           
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorProxy
getGeneratedType
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper
equals, getSource, hashCode, isParallelizable, isThreadSafe, setSource, toString
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, wasInitialized
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MIN_INCREMENT

public static final long DEFAULT_MIN_INCREMENT
See Also:
Constant Field Values

DEFAULT_MAX_INCREMENT

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

SkipGeneratorProxy

public SkipGeneratorProxy()

SkipGeneratorProxy

public SkipGeneratorProxy(Generator<E> source)
Initializes the generator to iterate with increment 1


SkipGeneratorProxy

public SkipGeneratorProxy(java.lang.Long minIncrement,
                          java.lang.Long maxIncrement)

SkipGeneratorProxy

public SkipGeneratorProxy(Generator<E> source,
                          java.lang.Long minIncrement,
                          java.lang.Long maxIncrement)
Initializes the generator to use a random increment of uniform distribution


SkipGeneratorProxy

public SkipGeneratorProxy(Generator<E> source,
                          java.lang.Long minIncrement,
                          java.lang.Long maxIncrement,
                          Distribution incrementDistribution)
Initializes the generator to use a random increment of uniform distribution

Method Detail

init

public void init(GeneratorContext context)
Specified by:
init in interface Generator<E>
Overrides:
init in class GeneratorWrapper<E,E>

generate

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

Specified by:
generate in interface Generator<E>
Overrides:
generate in class GeneratorProxy<E>
See Also:
Resettable.reset()

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<E>
Overrides:
close in class GeneratorWrapper<E,E>

reset

public void reset()
Specified by:
reset in interface Resettable
Overrides:
reset in class GeneratorWrapper<E,E>


Copyright © 2010. All Rights Reserved.