org.databene.benerator.wrapper
Class SingleSourceArrayGenerator<S,P>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<S,P>
org.databene.benerator.wrapper.CardinalGenerator<S,P>
org.databene.benerator.wrapper.SingleSourceArrayGenerator<S,P>
- All Implemented Interfaces:
- java.io.Closeable, Generator<P>, NonNullGenerator<P>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
- Direct Known Subclasses:
- ByteArrayGenerator, SimplifyingSingleSourceArrayGenerator
public class SingleSourceArrayGenerator<S,P>
- extends CardinalGenerator<S,P>
- implements NonNullGenerator<P>
Assembles the output of a source generator into an array of random length.
Created: 26.08.2006 09:37:55
- Since:
- 0.1
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.databene.commons.ThreadAware |
isParallelizable, isThreadSafe |
Methods inherited from interface org.databene.commons.Resettable |
reset |
SingleSourceArrayGenerator
public SingleSourceArrayGenerator(Generator<S> source,
java.lang.Class<S> componentType,
int minLength,
int maxLength,
Distribution lengthDistribution)
SingleSourceArrayGenerator
public SingleSourceArrayGenerator(Generator<S> source,
java.lang.Class<S> componentType,
NonNullGenerator<java.lang.Integer> lengthGenerator)
getGeneratedType
public java.lang.Class<P> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
- Specified by:
getGeneratedType
in interface Generator<P>
generate
public ProductWrapper<P> generate(ProductWrapper<P> 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.
- Specified by:
generate
in interface Generator<P>
generate
public P generate()
- Specified by:
generate
in interface NonNullGenerator<P>
Copyright © 2013. All Rights Reserved.