Interface State

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Iterator<Edge> getEdges()
      Get an iterator over all the transitions (edges) allowed from this state
      Edge getTransition​(int token, UserComplexType type)
      Find the edge representing the transition from this state to another state, that is triggered by a given input token
      Edge[] getWildcardEdges()
      Get an array of the wildcard transitions (edges) allowed from this state.
      boolean isFinalState()
      Ask whether this state is a valid final state, that is, no further transitions are needed to complete a successful path through the finite state machine
      java.lang.CharSequence listAllowedElements()
      Construct a human-readable message explaining what elements are permitted as transitions from this state
    • Method Detail

      • getTransition

        Edge getTransition​(int token,
                           UserComplexType type)
        Find the edge representing the transition from this state to another state, that is triggered by a given input token
        Parameters:
        token - the input token, specifically the fingerprint of an element name
        type - the complex type whose content model we are validating against
        Returns:
        the Edge representing the selected transition of the finite state machine, or null if this token is not accepted when in this State (which implies a validation error).
      • isFinalState

        boolean isFinalState()
        Ask whether this state is a valid final state, that is, no further transitions are needed to complete a successful path through the finite state machine
        Returns:
        true if this is a valid final state
      • listAllowedElements

        java.lang.CharSequence listAllowedElements()
        Construct a human-readable message explaining what elements are permitted as transitions from this state
        Returns:
        A message indicating what elements may come next
      • getWildcardEdges

        Edge[] getWildcardEdges()
        Get an array of the wildcard transitions (edges) allowed from this state.
        Returns:
        an array containing all the edges that represent element wildcards.
      • getEdges

        java.util.Iterator<Edge> getEdges()
        Get an iterator over all the transitions (edges) allowed from this state
        Returns:
        an Iterator over all the edges from this state. The objects returned by this Iterator are Edge objects.