org.databene.benerator.wrapper
Class RepeatGeneratorProxy<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<S,P>
org.databene.benerator.wrapper.CardinalGenerator<E,E>
org.databene.benerator.wrapper.RepeatGeneratorProxy<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class RepeatGeneratorProxy<E>
- extends CardinalGenerator<E,E>
A generator proxy that forwards the output of another generator with a random number of repetitions.
Created: 18.08.2007 17:08:10
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RepeatGeneratorProxy
public RepeatGeneratorProxy()
RepeatGeneratorProxy
public RepeatGeneratorProxy(Generator<E> source,
int minRepetitions,
int maxRepetitions)
RepeatGeneratorProxy
public RepeatGeneratorProxy(Generator<E> source,
int minRepetitions,
int maxRepetitions,
int repetitionGranularity,
Distribution repetitionDistribution)
getGeneratedType
public java.lang.Class<E> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
init
public void init(GeneratorContext context)
- Description copied from class:
CardinalGenerator
- ensures consistency of the state
- Specified by:
init
in interface Generator<E>
- Overrides:
init
in class CardinalGenerator<E,E>
generate
public ProductWrapper<E> generate(ProductWrapper<E> wrapper)
- Description copied from interface:
Generator
- Returns an instance of the generic type E, using the
ProductWrapper
instance provided as argument.
The wrapper may wrap a null value as a regular generator product.
If the generator is not available (any more), it returns null instead of
the ProductWrapper instance.
reset
public void reset()
- Specified by:
reset
in interface org.databene.commons.Resettable
- Overrides:
reset
in class CardinalGenerator<E,E>
Copyright © 2013. All Rights Reserved.