org.databene.benerator.primitive
Class UniqueScrambledStringGenerator
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.MultiGeneratorWrapper<java.lang.String,java.lang.String>
org.databene.benerator.primitive.UniqueScrambledStringGenerator
- All Implemented Interfaces:
- java.io.Closeable, Generator<java.lang.String>, NonNullGenerator<java.lang.String>, VarLengthStringGenerator, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class UniqueScrambledStringGenerator
- extends MultiGeneratorWrapper<java.lang.String,java.lang.String>
- implements VarLengthStringGenerator
Generates unique strings of variable length.
Created: 16.11.2007 11:56:15
- Author:
- Volker Bergmann
Methods inherited from class org.databene.benerator.wrapper.MultiGeneratorWrapper |
addSource, availableSourceCount, close, generateFromAllSources, generateFromAvailableSource, generateFromRandomSource, generateFromSource, getAvailableSource, getGeneratedType, getSource, getSources, getSourceWrapper, isParallelizable, isThreadSafe, reset, setSources |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.databene.commons.ThreadAware |
isParallelizable, isThreadSafe |
Methods inherited from interface org.databene.commons.Resettable |
reset |
UniqueScrambledStringGenerator
public UniqueScrambledStringGenerator()
UniqueScrambledStringGenerator
public UniqueScrambledStringGenerator(java.util.Set<java.lang.Character> chars,
int minLength,
int maxLength)
getMinLength
public int getMinLength()
setMinLength
public void setMinLength(int minLength)
getMaxLength
public int getMaxLength()
setMaxLength
public void setMaxLength(int maxLength)
init
public void init(GeneratorContext context)
- Specified by:
init
in interface Generator<java.lang.String>
- Overrides:
init
in class MultiGeneratorWrapper<java.lang.String,java.lang.String>
generateWithLength
public java.lang.String generateWithLength(int length)
- Specified by:
generateWithLength
in interface VarLengthStringGenerator
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.
- Specified by:
generate
in interface Generator<java.lang.String>
generate
public java.lang.String generate()
- Specified by:
generate
in interface NonNullGenerator<java.lang.String>
toString
public java.lang.String toString()
- Overrides:
toString
in class MultiGeneratorWrapper<java.lang.String,java.lang.String>
Copyright © 2013. All Rights Reserved.