org.databene.benerator.nullable
Class NullInjectingGeneratorWrapper<E>
java.lang.Object
org.databene.benerator.nullable.AbstractNullableGenerator<E>
org.databene.benerator.nullable.NullInjectingGeneratorWrapper<E>
- All Implemented Interfaces:
- java.io.Closeable, NullableGenerator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class NullInjectingGeneratorWrapper<E>
- extends AbstractNullableGenerator<E>
Proxy implementation of the NullableGenerator interface.
Created: 26.01.2010 10:32:58
- Since:
- 0.6.0
- Author:
- Volker Bergmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NullInjectingGeneratorWrapper
public NullInjectingGeneratorWrapper(Generator<E> source,
double nullQuota)
getGeneratedType
public java.lang.Class<E> getGeneratedType()
init
public void init(GeneratorContext context)
throws InvalidGeneratorSetupException
- Specified by:
init in interface NullableGenerator<E>- Overrides:
init in class AbstractNullableGenerator<E>
- Throws:
InvalidGeneratorSetupException
generate
public ProductWrapper<E> generate(ProductWrapper<E> wrapper)
- First checks if a null value should be returned, if so it returns a wrapper that wraps a null value,
otherwise a wrapper that wraps a value generated by the underlying source generator. If that generator
is not available any more,
null is returned.
reset
public void reset()
throws IllegalGeneratorStateException
- Throws:
IllegalGeneratorStateException
close
public void close()
isParallelizable
public boolean isParallelizable()
isThreadSafe
public boolean isThreadSafe()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2011. All Rights Reserved.