Class InitState<E>

  • Type Parameters:
    E - The type of events the FSM processes.
    All Implemented Interfaces:
    OutputState<E>, State<E>

    public class InitState<E>
    extends OutputStateImpl<E>
    An FSM state. An initial state is the unique state that can start an FSM.
    • Field Detail

      • fsm

        protected final FSM<E> fsm
      • name

        protected final String name
    • Constructor Detail

      • InitState

        protected InitState​(FSM<E> stateMachine,
                            String stateName)
    • Method Detail

      • exit

        public void exit()
                  throws CancelFSMException
        Description copied from interface: OutputState
        Actions done when a transition of the state is executed so that this state is left.
        Throws:
        CancelFSMException - If leaving the state leads to a cancelling of the FSM execution.
      • getName

        public String getName()
        Specified by:
        getName in interface State<E>
        Returns:
        The name of the state.
      • getFSM

        public FSM<E> getFSM()
        Specified by:
        getFSM in interface State<E>
        Returns:
        The FSM that contains the state.