public class StateEngineImpl extends Object implements StateEngine
| Constructor and Description |
|---|
StateEngineImpl() |
| 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 |
doIt(FSM fsm,
Input in,
boolean debug) |
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.
|
public StateEngine add(State oldState, Input input, Guard guard, Action action, State newState) throws IllegalArgumentException, IllegalStateException
StateEngineadd in interface StateEngineIllegalArgumentExceptionIllegalStateExceptionpublic StateEngine add(State oldState, Input input, Action action, State newState) throws IllegalArgumentException, IllegalStateException
StateEngineadd in interface StateEngineIllegalArgumentExceptionIllegalStateExceptionpublic StateEngine setDefault(State oldState, Action action, State newState) throws IllegalArgumentException, IllegalStateException
StateEnginesetDefault in interface StateEngineIllegalArgumentExceptionIllegalStateExceptionpublic StateEngine setDefault(State oldState, State newState) throws IllegalArgumentException, IllegalStateException
StateEnginesetDefault in interface StateEngineIllegalArgumentExceptionIllegalStateExceptionpublic StateEngine setDefault(State oldState) throws IllegalArgumentException, IllegalStateException
StateEnginesetDefault in interface StateEngineIllegalArgumentExceptionIllegalStateExceptionpublic void done()
throws IllegalStateException
StateEnginedone in interface StateEngineIllegalStateExceptionpublic void setDefaultAction(Action act) throws IllegalStateException
StateEnginesetDefaultAction in interface StateEngineIllegalStateExceptionpublic FSM makeFSM(State startState) throws IllegalStateException
StateEnginemakeFSM in interface StateEngineIllegalStateExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.