org.databene.benerator.sample
Class StateGenerator<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<E>
org.databene.benerator.util.SimpleGenerator<E>
org.databene.benerator.sample.StateGenerator<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class StateGenerator<E>
- extends SimpleGenerator<E>
Generates states as configured by a state machine.
Created at 17.07.2009 05:41:47
- Since:
- 0.6.0
- Author:
- Volker Bergmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StateGenerator
public StateGenerator()
StateGenerator
public StateGenerator(java.lang.String transitionSpec)
StateGenerator
public StateGenerator(java.lang.Class<E> generatedType)
setTransitions
public void setTransitions(java.lang.String transitionSpec)
addTransition
public void addTransition(E from,
E to,
double weight)
getGeneratedType
public java.lang.Class<E> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
init
public void init(GeneratorContext context)
throws InvalidGeneratorSetupException
- Specified by:
init in interface Generator<E>- Overrides:
init in class AbstractGenerator<E>
- Throws:
InvalidGeneratorSetupException
generate
public E generate()
throws IllegalGeneratorStateException
- Description copied from interface:
Generator
- Returns an instance of the generic type E.
- Throws:
IllegalGeneratorStateException
reset
public void reset()
throws IllegalGeneratorStateException
- Specified by:
reset in interface org.databene.commons.Resettable- Overrides:
reset in class AbstractGenerator<E>
- Throws:
IllegalGeneratorStateException
close
public void close()
- Description copied from interface:
Generator
- Closes the generator. After invocation the state is unavailable.
- Specified by:
close in interface java.io.Closeable- Specified by:
close in interface Generator<E>- Overrides:
close in class AbstractGenerator<E>
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractGenerator<E>
Copyright © 2011. All Rights Reserved.