org.databene.benerator.composite
Class InstanceArrayGenerator<S>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<S,P>
org.databene.benerator.wrapper.CardinalGenerator<S,java.lang.Object>
org.databene.benerator.composite.InstanceArrayGenerator<S>
- All Implemented Interfaces:
- java.io.Closeable, Generator<java.lang.Object>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class InstanceArrayGenerator<S>
- extends CardinalGenerator<S,java.lang.Object>
Creates a stochastic number of instances of a type. The number of elements is determined by the values
minCount, maxCount, countDistribution, countVariation1 and countVariation2.
If the number of items is not one, an array of respective size is returned,
otherwise a single object.
Created: 06.03.2008 15:43:54
- Since:
- 0.5.0
- Author:
- Volker Bergmann
|
Method Summary |
java.lang.Object |
generate()
Returns an instance of the generic type E. |
java.lang.Class<java.lang.Object> |
getGeneratedType()
Declares the type of the objects returned by the generate() method. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
InstanceArrayGenerator
public InstanceArrayGenerator(Generator<S> source)
getGeneratedType
public java.lang.Class<java.lang.Object> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
generate
public java.lang.Object generate()
- Description copied from interface:
Generator
- Returns an instance of the generic type E.
Copyright © 2011. All Rights Reserved.