org.databene.benerator.wrapper
Class SingleSourceCollectionGenerator<I,C extends java.util.Collection<I>>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<S,P>
org.databene.benerator.wrapper.CardinalGenerator<I,C>
org.databene.benerator.wrapper.SingleSourceCollectionGenerator<I,C>
- All Implemented Interfaces:
- java.io.Closeable, Generator<C>, NonNullGenerator<C>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class SingleSourceCollectionGenerator<I,C extends java.util.Collection<I>>
- extends CardinalGenerator<I,C>
- implements NonNullGenerator<C>
Generator
which takes one or more products from a source generator and wraps them with a Collection
.
Created: 24.02.2012 19:52:24
- Since:
- 0.7.6
- 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 |
SingleSourceCollectionGenerator
public SingleSourceCollectionGenerator(Generator<I> source,
java.lang.Class<C> collectionType,
NonNullGenerator<java.lang.Integer> lengthGenerator)
getGeneratedType
public java.lang.Class<C> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
- Specified by:
getGeneratedType
in interface Generator<C extends java.util.Collection<I>>
generate
public ProductWrapper<C> generate(ProductWrapper<C> 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<C extends java.util.Collection<I>>
generate
public C generate()
- Specified by:
generate
in interface NonNullGenerator<C extends java.util.Collection<I>>
Copyright © 2013. All Rights Reserved.