org.databene.benerator.wrapper
Class CompositeStringGenerator
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<java.lang.String[],java.lang.String>
org.databene.benerator.wrapper.CompositeStringGenerator
- All Implemented Interfaces:
- java.io.Closeable, Generator<java.lang.String>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
- Direct Known Subclasses:
- TokenCombiner.SimpleTokenCombinator
public class CompositeStringGenerator
- extends GeneratorWrapper<java.lang.String[],java.lang.String>
Uses n String generators and appends the output of each one in each generate() call.
Created: 17.11.2007 17:33:21
- Author:
- Volker Bergmann
Field Summary |
protected boolean |
unique
|
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper |
close, equals, generateFromSource, getSource, getSourceWrapper, hashCode, init, isParallelizable, isThreadSafe, reset, setSource |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
unique
protected boolean unique
CompositeStringGenerator
public CompositeStringGenerator()
CompositeStringGenerator
public CompositeStringGenerator(boolean unique,
Generator<java.lang.String>... sources)
isUnique
public boolean isUnique()
setSources
public void setSources(Generator<java.lang.String>[] sources)
getGeneratedType
public java.lang.Class<java.lang.String> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
generate
public ProductWrapper<java.lang.String> generate(ProductWrapper<java.lang.String> 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.
toString
public java.lang.String toString()
- Overrides:
toString
in class GeneratorWrapper<java.lang.String[],java.lang.String>
wrap
protected static Generator<java.lang.String[]> wrap(boolean unique,
Generator<?>... sources)
Copyright © 2013. All Rights Reserved.