org.databene.benerator.nullable
Class NullInjectingGeneratorProxy<E>
java.lang.Object
org.databene.benerator.nullable.AbstractNullableGenerator<E>
org.databene.benerator.nullable.NullInjectingGeneratorProxy<E>
- All Implemented Interfaces:
- java.io.Closeable, NullableGenerator<E>, Resettable, ThreadAware
public class NullInjectingGeneratorProxy<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, toString, wait, wait, wait |
NullInjectingGeneratorProxy
public NullInjectingGeneratorProxy(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()
Copyright © 2010. All Rights Reserved.