org.databene.benerator.wrapper
Class SimpleCompositeArrayGenerator<S>

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<P>
      extended by org.databene.benerator.wrapper.MultiGeneratorWrapper<S,S[]>
          extended by org.databene.benerator.wrapper.SimpleCompositeArrayGenerator<S>
All Implemented Interfaces:
java.io.Closeable, Generator<S[]>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class SimpleCompositeArrayGenerator<S>
extends MultiGeneratorWrapper<S,S[]>

Keeps an array of generators, of which it combines the products to an array.

Created: 26.08.2006 09:37:55

Since:
0.1
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.wrapper.MultiGeneratorWrapper
availableSources, sources
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
SimpleCompositeArrayGenerator()
           
SimpleCompositeArrayGenerator(java.lang.Class<S> componentType, Generator<? extends S>... sources)
          Initializes the generator to an array of source generators
 
Method Summary
 S[] generate()
          Returns an instance of the generic type E.
 java.lang.Class<S[]> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 
Methods inherited from class org.databene.benerator.wrapper.MultiGeneratorWrapper
addSource, close, generateFromAllSources, generateFromRandomSource, getSource, getSources, init, isParallelizable, isThreadSafe, reset, setSources, toString
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleCompositeArrayGenerator

public SimpleCompositeArrayGenerator()

SimpleCompositeArrayGenerator

public SimpleCompositeArrayGenerator(java.lang.Class<S> componentType,
                                     Generator<? extends S>... sources)
Initializes the generator to an array of source generators

Method Detail

getGeneratedType

public java.lang.Class<S[]> getGeneratedType()
Description copied from interface: Generator
Declares the type of the objects returned by the generate() method.


generate

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

See Also:
Generator.generate()


Copyright © 2011. All Rights Reserved.