Class StdState<E>

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

    public class StdState<E>
    extends OutputStateImpl<E>
    implements InputState<E>
    An FSM state. A standard state can compose an FSM. They do not start, stop, cancel an FSM. They accept input and ouptut events.
    • Field Detail

      • fsm

        protected final FSM<E> fsm
      • name

        protected final String name
    • Constructor Detail

      • StdState

        public StdState​(FSM<E> stateMachine,
                        String stateName)
        Creates the state.
        Parameters:
        stateMachine - The FSM that will contain the state.
        stateName - The name of this state.
    • Method Detail

      • exit

        public void exit()
        Description copied from interface: OutputState
        Actions done when a transition of the state is executed so that this state is left.
        Specified by:
        exit in interface OutputState<E>
      • 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.