org.databene.benerator.wrapper
Class MultiGeneratorWrapper<S,P>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.MultiGeneratorWrapper<S,P>
- All Implemented Interfaces:
- java.io.Closeable, Generator<P>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
- Direct Known Subclasses:
- AlternativeGenerator, SimpleCompositeArrayGenerator, UniqueCompositeArrayGenerator, UniqueStringGenerator
public abstract class MultiGeneratorWrapper<S,P>
- extends AbstractGenerator<P>
Parent class for wrapping several other generators (in a sources property)
and refining a composite state from them.
Created: 19.12.2006 07:05:29
- Since:
- 0.1
- Author:
- Volker Bergmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sources
protected Generator<? extends S>[] sources
availableSources
protected java.util.List<Generator<? extends S>> availableSources
MultiGeneratorWrapper
public MultiGeneratorWrapper(Generator<? extends S>... sources)
getSources
public Generator<? extends S>[] getSources()
setSources
public void setSources(Generator<? extends S>... sources)
getSource
public Generator<? extends S> getSource(int index)
addSource
public void addSource(Generator<S> source)
init
public void init(GeneratorContext context)
- Specified by:
init in interface Generator<P>- Overrides:
init in class AbstractGenerator<P>
reset
public void reset()
- Specified by:
reset in interface org.databene.commons.Resettable- Overrides:
reset in class AbstractGenerator<P>
close
public void close()
- Description copied from interface:
Generator
- Closes the generator. After invocation the state is unavailable.
- Specified by:
close in interface java.io.Closeable- Specified by:
close in interface Generator<P>- Overrides:
close in class AbstractGenerator<P>
isThreadSafe
public boolean isThreadSafe()
isParallelizable
public boolean isParallelizable()
generateFromRandomSource
protected S generateFromRandomSource()
generateFromAllSources
protected S[] generateFromAllSources(java.lang.Class<S> componentType)
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractGenerator<P>
Copyright © 2011. All Rights Reserved.