Package com.saxonica.ee.schema.fsa
Interface State
-
- All Known Implementing Classes:
AutomatonState,CountingState,DeterminizedState,NonDeterminizedState,SuffixState
public interface StateA State is a dynamic state of the finite state machine. It may either be a static (non-counting) AutomatonState, or a dynamically-created CountingState, which represents the combination of an AutomatonState and a counter value
-
-
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 stateEdgegetTransition(int token, UserComplexType type)Find the edge representing the transition from this state to another state, that is triggered by a given input tokenEdge[]getWildcardEdges()Get an array of the wildcard transitions (edges) allowed from this state.booleanisFinalState()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 machinejava.lang.CharSequencelistAllowedElements()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 nametype- 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.
-
-