org.databene.benerator.util
Class AbstractNonNullGenerator<E>

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.util.AbstractNonNullGenerator<E>
All Implemented Interfaces:
java.io.Closeable, Generator<E>, NonNullGenerator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
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 org.databene.benerator.util.AbstractGenerator
context, logger, state
 
Constructor Summary
AbstractNonNullGenerator()
           
 
Method Summary
abstract  E generate()
           
 ProductWrapper<E> generate(ProductWrapper<E> wrapper)
          Returns an instance of the generic type E, using the ProductWrapper instance provided as argument.
 
Methods inherited from class org.databene.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 org.databene.benerator.Generator
close, getGeneratedType, init, wasInitialized
 
Methods inherited from interface org.databene.commons.ThreadAware
isParallelizable, isThreadSafe
 
Methods inherited from interface org.databene.commons.Resettable
reset
 

Constructor Detail

AbstractNonNullGenerator

public AbstractNonNullGenerator()
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 the ProductWrapper 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.

Specified by:
generate in interface Generator<E>

generate

public abstract E generate()
Specified by:
generate in interface NonNullGenerator<E>


Copyright © 2013. All Rights Reserved.