Class TransitionsBuilderImpl<S,​E,​C>

    • Field Detail

      • target

        protected State<S,​E,​C> target
    • Constructor Detail

      • TransitionsBuilderImpl

        public TransitionsBuilderImpl​(Map<S,​State<S,​E,​C>> stateMap,
                                      TransitionType transitionType)
    • Method Detail

      • on

        public On<S,​E,​C> on​(E event)
        Description copied from interface: To
        Build transition event
        Specified by:
        on in interface To<S,​E,​C>
        Parameters:
        event - transition event
        Returns:
        On clause builder
      • when

        public When<S,​E,​C> when​(Condition<C> condition)
        Description copied from interface: On
        Add condition for the transition
        Specified by:
        when in interface On<S,​E,​C>
        Parameters:
        condition - transition condition
        Returns:
        When clause builder
      • perform

        public void perform​(Action<S,​E,​C> action)
        Description copied from interface: When
        Define action to be performed during transition
        Specified by:
        perform in interface When<S,​E,​C>
        Parameters:
        action - performed action
      • to

        public To<S,​E,​C> to​(S stateId)
        Description copied from interface: From
        Build transition target state and return to clause builder
        Specified by:
        to in interface From<S,​E,​C>
        Parameters:
        stateId - id of state
        Returns:
        To clause builder