org.databene.benerator.sample
Class StateTransitionGenerator<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<E,Transition>
org.databene.benerator.sample.StateTransitionGenerator<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<Transition>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class StateTransitionGenerator<E>
- extends GeneratorWrapper<E,Transition>
Generates state transitions of a state machine.
Created at 17.07.2009 08:04:12
- Since:
- 0.6.0
- Author:
- Volker Bergmann
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
StateTransitionGenerator
public StateTransitionGenerator(java.lang.Class<E> stateType)
StateTransitionGenerator
public StateTransitionGenerator(java.lang.Class<E> stateType,
java.lang.String transitionSpec)
addTransition
public void addTransition(E from,
E to,
double weight)
getGeneratedType
public java.lang.Class<Transition> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
generate
public Transition generate()
throws IllegalGeneratorStateException
- Description copied from interface:
Generator
- Returns an instance of the generic type E.
- Throws:
IllegalGeneratorStateException
reset
public void reset()
- Specified by:
reset in interface org.databene.commons.Resettable- Overrides:
reset in class GeneratorWrapper<E,Transition>
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<Transition>- Overrides:
close in class GeneratorWrapper<E,Transition>
Copyright © 2011. All Rights Reserved.