org.databene.benerator.primitive
Class UniqueFixedLengthStringGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.util.ThreadSafeGenerator<java.lang.String>
          extended by org.databene.benerator.primitive.UniqueFixedLengthStringGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.String>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class UniqueFixedLengthStringGenerator
extends ThreadSafeGenerator<java.lang.String>

Generates unique strings of fixed length.

Created: 15.11.2007 14:07:49


Field Summary
static java.util.Set<java.lang.Character> DEFAULT_CHAR_SET
           
static java.util.Set<java.lang.Character> ORDERED_CHAR_SET
           
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
UniqueFixedLengthStringGenerator()
           
UniqueFixedLengthStringGenerator(int length, char... chars)
           
UniqueFixedLengthStringGenerator(int length, java.util.Set<java.lang.Character> charSet)
           
 
Method Summary
 java.lang.String generate()
          Returns an instance of the generic type E.
 java.lang.Class<java.lang.String> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 void init(GeneratorContext context)
           
 void reset()
           
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.util.ThreadSafeGenerator
isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, close, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CHAR_SET

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

ORDERED_CHAR_SET

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

UniqueFixedLengthStringGenerator

public UniqueFixedLengthStringGenerator()

UniqueFixedLengthStringGenerator

public UniqueFixedLengthStringGenerator(int length,
                                        java.util.Set<java.lang.Character> charSet)

UniqueFixedLengthStringGenerator

public UniqueFixedLengthStringGenerator(int length,
                                        char... chars)
Method Detail

init

public void init(GeneratorContext context)
Specified by:
init in interface Generator<java.lang.String>
Overrides:
init in class AbstractGenerator<java.lang.String>

generate

public java.lang.String generate()
Description copied from interface: Generator
Returns an instance of the generic type E.


reset

public void reset()
Specified by:
reset in interface org.databene.commons.Resettable
Overrides:
reset in class AbstractGenerator<java.lang.String>

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.


toString

public java.lang.String toString()
Overrides:
toString in class AbstractGenerator<java.lang.String>


Copyright © 2011. All Rights Reserved.