Package com.rapiddweller.benerator.util
Class AbstractNonNullGenerator<E>
- java.lang.Object
-
- com.rapiddweller.benerator.util.AbstractGenerator<E>
-
- com.rapiddweller.benerator.util.AbstractNonNullGenerator<E>
-
- Type Parameters:
E
- the type parameter
- All Implemented Interfaces:
Generator<E>
,NonNullGenerator<E>
,com.rapiddweller.common.Resettable
,com.rapiddweller.common.ThreadAware
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractNonNullNumberGenerator
,CompanyDomainGenerator
,HiLoGenerator
,ThreadSafeNonNullGenerator
,UnsafeNonNullGenerator
public abstract class AbstractNonNullGenerator<E> extends AbstractGenerator<E> implements NonNullGenerator<E>
Abstract implementation of the NonNullGenerator.
Created: 26.07.2011 17:35:35- Since:
- 0.7.0
- Author:
- Volker Bergmann
-
-
Field Summary
-
Fields inherited from class com.rapiddweller.benerator.util.AbstractGenerator
context, logger, state
-
-
Constructor Summary
Constructors Constructor Description AbstractNonNullGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract E
generate()
Generate e.ProductWrapper<E>
generate(ProductWrapper<E> wrapper)
Returns an instance of the generic type E, using theProductWrapper
instance provided as argument.-
Methods inherited from class com.rapiddweller.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, close, getResultWrapper, init, reset, toString, wasInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.rapiddweller.benerator.Generator
close, getGeneratedType, init, wasInitialized
-
-
-
-
Method Detail
-
generate
public final ProductWrapper<E> generate(ProductWrapper<E> wrapper)
Description copied from interface:Generator
Returns an instance of the generic type E, using theProductWrapper
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.
-
generate
public abstract E generate()
Description copied from interface:NonNullGenerator
Generate e.- Specified by:
generate
in interfaceNonNullGenerator<E>
- Returns:
- the e
-
-