cz.cuni.amis.fsm
Class FSMNested<SYMBOL,CONTEXT>
java.lang.Object
cz.cuni.amis.fsm.FSMNested<SYMBOL,CONTEXT>
- Type Parameters:
SYMBOL - CONTEXT -
- All Implemented Interfaces:
- IFSM<SYMBOL,CONTEXT>, IFSMState<SYMBOL,CONTEXT>
public class FSMNested<SYMBOL,CONTEXT>
- extends java.lang.Object
- implements IFSM<SYMBOL,CONTEXT>, IFSMState<SYMBOL,CONTEXT>
Wraps the IFSM implementation as the IFSMState thus allowing you to create hierarchical fsm.
Note that there is no "correct" implementation of this class (how to behave in the stateEntering(),
stateLeaving() methods). See the implementation and if needed create your own wrapper.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FSMNested
public FSMNested(IFSM<SYMBOL,CONTEXT> fsm)
isTerminal
public boolean isTerminal()
- Specified by:
isTerminal in interface IFSM<SYMBOL,CONTEXT>
push
public void push(CONTEXT context,
SYMBOL symbol)
- Specified by:
push in interface IFSM<SYMBOL,CONTEXT>
restart
public void restart(CONTEXT context)
- Specified by:
restart in interface IFSM<SYMBOL,CONTEXT>- Specified by:
restart in interface IFSMState<SYMBOL,CONTEXT>
init
public void init(CONTEXT context)
- Specified by:
init in interface IFSMState<SYMBOL,CONTEXT>
stateEntering
public void stateEntering(CONTEXT context,
IFSMState<SYMBOL,CONTEXT> fromState,
SYMBOL symbol)
- Specified by:
stateEntering in interface IFSMState<SYMBOL,CONTEXT>
stateLeaving
public void stateLeaving(CONTEXT context,
IFSMState<SYMBOL,CONTEXT> toState,
SYMBOL symbol)
- Specified by:
stateLeaving in interface IFSMState<SYMBOL,CONTEXT>
stateSymbol
public void stateSymbol(CONTEXT context,
SYMBOL symbol)
- Specified by:
stateSymbol in interface IFSMState<SYMBOL,CONTEXT>