|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.util.state.StateMachine
The representation of a finite state machine.
Constructor Summary | |
StateMachine(Set states,
State startState)
Create a state machine given its states and start state. |
|
StateMachine(Set states,
State startState,
String description)
Create a state machine given its states and start state. |
Method Summary | |
Object |
clone()
Make a copy of the StateMachine maintaining the current state. |
State |
getCurrentState()
Get the current state of the state machine. |
String |
getDescription()
Get the state machine description. |
State |
getStartState()
Get the start state of the state machine. |
Set |
getStates()
Get the states of the state machine. |
State |
nextState(String actionName)
Transition to the next state given the name of a valid transition. |
State |
reset()
Reset the state machine back to the start state |
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StateMachine(Set states, State startState)
states
- - SetstartState
- - the starting statepublic StateMachine(Set states, State startState, String description)
states
- - SetstartState
- - the starting statedescription
- - an optional description of the state machineMethod Detail |
public Object clone()
public String getDescription()
public State getCurrentState()
public State getStartState()
public Set getStates()
public State nextState(String actionName) throws IllegalTransitionException
actionName
- - the name of transition that is valid for the
current state.
IllegalTransitionException
public State reset()
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |