|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.databene.benerator.util.AbstractGenerator<E>
org.databene.benerator.util.ThreadSafeGenerator<E>
org.databene.benerator.sample.OneShotGenerator<E>
public class OneShotGenerator<E>
Returns a value only once and then becomes unavailable immediately.
Created at 23.09.2009 00:20:03
| Field Summary |
|---|
| Fields inherited from class org.databene.benerator.util.AbstractGenerator |
|---|
context, state |
| Constructor Summary | |
|---|---|
OneShotGenerator(E value)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the generator. |
E |
generate()
Returns an instance of the generic type E. |
java.lang.Class<E> |
getGeneratedType()
Declares the type of the objects returned by the generate() method. |
void |
init(GeneratorContext context)
|
void |
reset()
|
| Methods inherited from class org.databene.benerator.util.ThreadSafeGenerator |
|---|
isParallelizable, isThreadSafe |
| Methods inherited from class org.databene.benerator.util.AbstractGenerator |
|---|
assertInitialized, assertNotInitialized, toString, wasInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OneShotGenerator(E value)
| Method Detail |
|---|
public void close()
Generator
close in interface java.io.Closeableclose in interface Generator<E>close in class AbstractGenerator<E>
public E generate()
throws IllegalGeneratorStateException
Generator
IllegalGeneratorStateExceptionpublic java.lang.Class<E> getGeneratedType()
Generator
public void init(GeneratorContext context)
throws InvalidGeneratorSetupException
init in interface Generator<E>init in class AbstractGenerator<E>InvalidGeneratorSetupExceptionpublic void reset()
reset in interface org.databene.commons.Resettablereset in class AbstractGenerator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||