org.databene.domain.product
Class EANGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<P>
      extended by org.databene.benerator.wrapper.GeneratorWrapper<E,E>
          extended by org.databene.benerator.wrapper.GeneratorProxy<java.lang.String>
              extended by org.databene.domain.product.EANGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.String>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class EANGenerator
extends GeneratorProxy<java.lang.String>

Generates EAN8 and EAN13 codes at the configured ratio.

Created: 30.07.2007 21:23:44

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.wrapper.GeneratorWrapper
source
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
EANGenerator()
           
EANGenerator(boolean unique)
           
 
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)
           
 boolean isUnique()
           
 void setUnique(boolean unique)
           
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper
close, equals, getSource, hashCode, isParallelizable, isThreadSafe, reset, setSource
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, wasInitialized
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EANGenerator

public EANGenerator()

EANGenerator

public EANGenerator(boolean unique)
Method Detail

isUnique

public boolean isUnique()

setUnique

public void setUnique(boolean unique)

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.

Specified by:
getGeneratedType in interface Generator<java.lang.String>
Overrides:
getGeneratedType in class GeneratorProxy<java.lang.String>

init

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

generate

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

Specified by:
generate in interface Generator<java.lang.String>
Overrides:
generate in class GeneratorProxy<java.lang.String>

toString

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


Copyright © 2011. All Rights Reserved.