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
StateEngine
add
in interface StateEngine
IllegalArgumentException
IllegalStateException
public StateEngine add(State oldState, Input input, Action action, State newState) throws IllegalArgumentException, IllegalStateException
StateEngine
add
in interface StateEngine
IllegalArgumentException
IllegalStateException
public StateEngine setDefault(State oldState, Action action, State newState) throws IllegalArgumentException, IllegalStateException
StateEngine
setDefault
in interface StateEngine
IllegalArgumentException
IllegalStateException
public StateEngine setDefault(State oldState, State newState) throws IllegalArgumentException, IllegalStateException
StateEngine
setDefault
in interface StateEngine
IllegalArgumentException
IllegalStateException
public StateEngine setDefault(State oldState) throws IllegalArgumentException, IllegalStateException
StateEngine
setDefault
in interface StateEngine
IllegalArgumentException
IllegalStateException
public void done() throws IllegalStateException
StateEngine
done
in interface StateEngine
IllegalStateException
public void setDefaultAction(Action act) throws IllegalStateException
StateEngine
setDefaultAction
in interface StateEngine
IllegalStateException
public FSM makeFSM(State startState) throws IllegalStateException
StateEngine
makeFSM
in interface StateEngine
IllegalStateException
Copyright © 2016 JBoss by Red Hat. All rights reserved.