Class MooreBuilder<S,​I,​T,​O,​A extends MutableMooreMachine<S,​? super I,​T,​? super O>>

  • Type Parameters:
    S - state type
    I - input symbol type
    T - transition type
    O - output symbol type
    A - concrete automaton type

    public class MooreBuilder<S,​I,​T,​O,​A extends MutableMooreMachine<S,​? super I,​T,​? super O>>
    extends Object
    A fluent builder for MooreMachines.
    • Method Detail

      • withInitial

        public MooreBuilder.MooreBuilder0 withInitial​(Object stateId)
        Marks the given state as initial.
        Parameters:
        stateId - the object to identify the state
        Returns:
        the next fluent state
      • withInitial

        public MooreBuilder.MooreBuilder0 withInitial​(Object stateId,
                                                      O output)
        Marks the given state as initial and allows to set its output.
        Parameters:
        stateId - the object to identify the state
        output - the output of the state
        Returns:
        the next fluent state
      • from

        public MooreBuilder.MooreBuilder1 from​(Object stateId)
        Starts a definition of transition(s) from a given source state.
        Parameters:
        stateId - the object to identify the state
        Returns:
        the next fluent state
      • from

        public MooreBuilder.MooreBuilder1 from​(Object firstStateId,
                                               Object... otherStateIds)
        Starts a definition of transition(s) from multiple given source states.
        Parameters:
        firstStateId - the mandatory object to identify the first state
        otherStateIds - the optional objects to identify additional states
        Returns:
        the next fluent state
      • withOutput

        public MooreBuilder<S,​I,​T,​O,​A> withOutput​(Object stateId,
                                                                          O output)
        Associates with the given state the given output symbol.
        Parameters:
        stateId - the object to identify the state
        output - the output symbol
        Returns:
        the next fluent state