Class CancellingState<E>

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

    public class CancellingState<E>
    extends Object
    implements InputState<E>
    A state of an FSM. A cancelling state cancels the FSM of a user interaction.
    • Field Detail

      • fsm

        protected final FSM<E> fsm
      • name

        protected final String name
    • Constructor Detail

      • CancellingState

        public CancellingState​(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

      • enter

        public void enter()
        Description copied from interface: InputState
        Actions done while entering this state.
        Specified by:
        enter in interface InputState<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.