Class FSABuilder.FSABuilder2

  • Enclosing class:
    FSABuilder<S,​I,​A extends MutableFSA<S,​? super I>>

    public final class FSABuilder.FSABuilder2
    extends Object
    A state (-class) of the enclosing fluent interface.
    • Method Detail

      • loop

        public FSABuilder.FSABuilder2 loop()
        Sets the target state(s) of the current transition definition(s) by looping back to the respective source state(s).
        Returns:
        the next fluent state
      • withAccepting

        public FSABuilder<S,​I,​A> withAccepting​(Object stateId)
        Marks the given state as accepting.
        Parameters:
        stateId - the object to identify the state
        Returns:
        the next fluent state
      • withAccepting

        public FSABuilder<S,​I,​A> withAccepting​(Object stateId,
                                                           Object... stateIds)
        Marks the given states as accepting.
        Parameters:
        stateId - the object to identify the mandatory state
        stateIds - the objects to identify the additional states
        Returns:
        the next fluent state
      • create

        public A create()
        Returns the constructed automaton.
        Returns:
        the automaton
      • withInitial

        public FSABuilder<S,​I,​A> withInitial​(Object stateId)
        Marks the given state as initial.
        Parameters:
        stateId - the object to identify the state
        Returns:
        the next fluent state
      • withInitial

        public FSABuilder<S,​I,​A> withInitial​(Object stateId,
                                                         Object... stateIds)
        Marks the given states as initial.
        Parameters:
        stateId - the object to identify the mandatory state
        stateIds - the objects to identify the additional states
        Returns:
        the next fluent state
      • from

        public FSABuilder.FSABuilder0 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 FSABuilder.FSABuilder0 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
      • to

        public FSABuilder.FSABuilder2 to​(Object stateId)
        Sets the target state of the current transition definition(s).
        Parameters:
        stateId - the object to identify the state
        Returns:
        the next fluent state
      • to

        public FSABuilder.FSABuilder2 to​(Object firstStateId,
                                         Object... otherStateIds)
        Sets the target states of the current transition definition(s).
        Parameters:
        firstStateId - the mandatory object to identify the first state
        otherStateIds - the optional objects to identify additional states
        Returns:
        the next fluent state
      • on

        public FSABuilder.FSABuilder1 on​(I input)
        Sets the input symbol of the current transition definition(s).
        Parameters:
        input - the input symbol
        Returns:
        the next fluent state
      • on

        @SafeVarargs
        public final FSABuilder.FSABuilder1 on​(I firstInput,
                                               I... otherInputs)
        Sets multiple input symbols of the current transition definition(s).
        Parameters:
        firstInput - the mandatory first input symbol
        otherInputs - the optional additional input symbols
        Returns:
        the next fluent state