cz.cuni.amis.fsm
Class FSM.StateWrapper<SYMBOL,CONTEXT>

java.lang.Object
  extended by cz.cuni.amis.fsm.FSM.StateWrapper<SYMBOL,CONTEXT>
All Implemented Interfaces:
IFSMState<SYMBOL,CONTEXT>
Enclosing class:
FSM<SYMBOL,CONTEXT>

protected static class FSM.StateWrapper<SYMBOL,CONTEXT>
extends java.lang.Object
implements IFSMState<SYMBOL,CONTEXT>


Constructor Summary
FSM.StateWrapper(IFSMState<SYMBOL,CONTEXT> state, java.util.logging.Logger log)
           
 
Method Summary
 java.util.Map<java.lang.Class,FSM.TransitionWrapper<SYMBOL,CONTEXT>> getTransitions()
           
 IFSMState<SYMBOL,CONTEXT> getWrappedState()
           
 void init(CONTEXT context)
           
protected  void initTransitionMap(java.util.Map<java.lang.Class,FSM.StateWrapper<SYMBOL,CONTEXT>> states, java.util.Map<java.lang.Class,IFSMTransition<SYMBOL,CONTEXT>> transitions)
           
 boolean isTerminal()
           
 FSM.StateWrapper pushSymbol(CONTEXT context, SYMBOL symbol)
           
 void restart(CONTEXT context)
           
 void stateEntering(CONTEXT context, IFSMState<SYMBOL,CONTEXT> fromState, SYMBOL symbol)
           
 void stateLeaving(CONTEXT context, IFSMState<SYMBOL,CONTEXT> toState, SYMBOL symbol)
           
 void stateSymbol(CONTEXT context, SYMBOL symbol)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FSM.StateWrapper

public FSM.StateWrapper(IFSMState<SYMBOL,CONTEXT> state,
                        java.util.logging.Logger log)
Parameters:
state -
log - may be null
Method Detail

initTransitionMap

protected void initTransitionMap(java.util.Map<java.lang.Class,FSM.StateWrapper<SYMBOL,CONTEXT>> states,
                                 java.util.Map<java.lang.Class,IFSMTransition<SYMBOL,CONTEXT>> transitions)

init

public void init(CONTEXT context)
Specified by:
init in interface IFSMState<SYMBOL,CONTEXT>

restart

public void restart(CONTEXT context)
Specified by:
restart 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>

pushSymbol

public FSM.StateWrapper pushSymbol(CONTEXT context,
                                   SYMBOL symbol)

isTerminal

public boolean isTerminal()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getWrappedState

public IFSMState<SYMBOL,CONTEXT> getWrappedState()

getTransitions

public java.util.Map<java.lang.Class,FSM.TransitionWrapper<SYMBOL,CONTEXT>> getTransitions()