org.databene.benerator.primitive
Class UniqueFixedLengthStringGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<P>
      extended by org.databene.benerator.wrapper.GeneratorWrapper<S,P>
          extended by org.databene.benerator.wrapper.NonNullGeneratorWrapper<int[],java.lang.String>
              extended by org.databene.benerator.primitive.UniqueFixedLengthStringGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.String>, NonNullGenerator<java.lang.String>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class UniqueFixedLengthStringGenerator
extends NonNullGeneratorWrapper<int[],java.lang.String>

Generates unique strings of fixed length.

Created: 15.11.2007 14:07:49

Author:
Volker Bergmann

Field Summary
static java.util.Set<java.lang.Character> DEFAULT_CHAR_SET
           
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, logger, state
 
Constructor Summary
UniqueFixedLengthStringGenerator()
           
UniqueFixedLengthStringGenerator(java.util.Set<java.lang.Character> chars, int length, boolean ordered)
           
 
Method Summary
 java.lang.String generate()
           
 java.lang.Class<java.lang.String> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 void init(GeneratorContext context)
           
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.wrapper.NonNullGeneratorWrapper
generate, generateFromNotNullSource, getSource, setSource
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper
close, equals, generateFromSource, getSourceWrapper, hashCode, isParallelizable, isThreadSafe, reset, setSource
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, getResultWrapper, wasInitialized
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.databene.benerator.Generator
close, wasInitialized
 
Methods inherited from interface org.databene.commons.ThreadAware
isParallelizable, isThreadSafe
 
Methods inherited from interface org.databene.commons.Resettable
reset
 

Field Detail

DEFAULT_CHAR_SET

public static final java.util.Set<java.lang.Character> DEFAULT_CHAR_SET
Constructor Detail

UniqueFixedLengthStringGenerator

public UniqueFixedLengthStringGenerator()

UniqueFixedLengthStringGenerator

public UniqueFixedLengthStringGenerator(java.util.Set<java.lang.Character> chars,
                                        int length,
                                        boolean ordered)
Method Detail

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.


init

public void init(GeneratorContext context)
Specified by:
init in interface Generator<java.lang.String>
Overrides:
init in class GeneratorWrapper<int[],java.lang.String>

generate

public java.lang.String generate()

toString

public java.lang.String toString()
Overrides:
toString in class GeneratorWrapper<int[],java.lang.String>


Copyright © 2013. All Rights Reserved.