Package com.rapiddweller.domain.product
Class EAN13Generator
- java.lang.Object
-
- com.rapiddweller.benerator.util.AbstractGenerator<P>
-
- com.rapiddweller.benerator.wrapper.GeneratorWrapper<S,P>
-
- com.rapiddweller.benerator.wrapper.NonNullGeneratorWrapper<java.lang.String,java.lang.String>
-
- com.rapiddweller.domain.product.EAN13Generator
-
- All Implemented Interfaces:
Generator<java.lang.String>
,NonNullGenerator<java.lang.String>
,com.rapiddweller.common.Resettable
,com.rapiddweller.common.ThreadAware
,java.io.Closeable
,java.lang.AutoCloseable
public class EAN13Generator extends NonNullGeneratorWrapper<java.lang.String,java.lang.String>
Generates 13-digits EAN codes.
Created: 30.07.2007 21:47:30- Author:
- Volker Bergmann
-
-
Field Summary
-
Fields inherited from class com.rapiddweller.benerator.util.AbstractGenerator
context, logger, state
-
-
Constructor Summary
Constructors Constructor Description EAN13Generator()
Instantiates a new Ean 13 generator.EAN13Generator(boolean unique)
Instantiates a new Ean 13 generator.EAN13Generator(boolean unique, boolean ordered)
Instantiates a new Ean 13 generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
generate()
Generate e.java.lang.Class<java.lang.String>
getGeneratedType()
Declares the type of the objects returned by the generate() method.void
init(GeneratorContext context)
Init.boolean
isOrdered()
Is ordered boolean.boolean
isUnique()
Is unique boolean.void
setOrdered(boolean ordered)
Sets ordered.java.lang.String
toString()
-
Methods inherited from class com.rapiddweller.benerator.wrapper.NonNullGeneratorWrapper
generate, generateFromNotNullSource, getSource, setSource
-
Methods inherited from class com.rapiddweller.benerator.wrapper.GeneratorWrapper
close, equals, generateFromSource, getSourceWrapper, hashCode, isParallelizable, isThreadSafe, reset, setSource
-
Methods inherited from class com.rapiddweller.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 com.rapiddweller.benerator.Generator
close, wasInitialized
-
-
-
-
Constructor Detail
-
EAN13Generator
public EAN13Generator()
Instantiates a new Ean 13 generator.
-
EAN13Generator
public EAN13Generator(boolean unique)
Instantiates a new Ean 13 generator.- Parameters:
unique
- the unique
-
EAN13Generator
public EAN13Generator(boolean unique, boolean ordered)
Instantiates a new Ean 13 generator.- Parameters:
unique
- the uniqueordered
- the ordered
-
-
Method Detail
-
isUnique
public boolean isUnique()
Is unique boolean.- Returns:
- the boolean
-
isOrdered
public boolean isOrdered()
Is ordered boolean.- Returns:
- the boolean
-
setOrdered
public void setOrdered(boolean ordered)
Sets ordered.- Parameters:
ordered
- the ordered
-
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.- Returns:
- the generated type
-
init
public void init(GeneratorContext context)
Description copied from interface:Generator
Init.- Specified by:
init
in interfaceGenerator<java.lang.String>
- Overrides:
init
in classGeneratorWrapper<java.lang.String,java.lang.String>
- Parameters:
context
- the context
-
generate
public java.lang.String generate()
Description copied from interface:NonNullGenerator
Generate e.- Returns:
- the e
-
toString
public java.lang.String toString()
- Overrides:
toString
in classGeneratorWrapper<java.lang.String,java.lang.String>
-
-