public interface StateEngine
The function can be non-deterministic in that the same input may cause transitions to different new states from the current state. In this case, the action that is executed for the transition must set the correct new state.
| Modifier and Type | Method and Description |
|---|---|
StateEngine |
add(State oldState,
Input input,
Action action,
State newState)
Add a transition with a guard that always evaluates to true.
|
StateEngine |
add(State oldState,
Input input,
Guard guard,
Action action,
State newState)
Add a new transition (old,in,guard,act,new) to the state engine.
|
void |
done()
Called after all transitions have been added to the state engine.
|
FSM |
makeFSM(State startState)
Create an instance of a FSM that uses this state engine.
|
StateEngine |
setDefault(State oldState)
Euaivalent to setDefault( oldState, oldState )
|
StateEngine |
setDefault(State oldState,
Action action,
State newState)
Set the default transition and action for a state.
|
StateEngine |
setDefault(State oldState,
State newState)
Equivalent to setDefault( oldState, act, newState ) where act is an
action that does nothing.
|
void |
setDefaultAction(Action act)
Set the default action used in this state engine.
|
StateEngine add(State oldState, Input input, Guard guard, Action action, State newState) throws IllegalStateException
IllegalStateExceptionStateEngine add(State oldState, Input input, Action action, State newState) throws IllegalStateException
IllegalStateExceptionStateEngine setDefault(State oldState, Action action, State newState) throws IllegalStateException
IllegalStateExceptionStateEngine setDefault(State oldState, State newState) throws IllegalStateException
IllegalStateExceptionStateEngine setDefault(State oldState) throws IllegalStateException
IllegalStateExceptionvoid setDefaultAction(Action act) throws IllegalStateException
IllegalStateExceptionvoid done() throws IllegalStateException
IllegalStateExceptionFSM makeFSM(State startState) throws IllegalStateException
IllegalStateExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.