Package com.saxonica.ee.schema.fsa
Class CountingState
java.lang.Object
com.saxonica.ee.schema.fsa.CountingState
- All Implemented Interfaces:
State
A counting state is a dynamic object representing the combination of an AutomatonState and a counter value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetEdges()Get an iterator over all the transitions (edges) allowed from this stategetTransition(int token, UserComplexType type) Find the edge representing the transition from this state to another state, that is triggered by a given input tokenEdge[]Get an iterator over the wildcard transitions (edges) allowed from this state.inthashCode()booleanAsk whether this state is a valid final state, that is, no further transitions are needed to complete a successful path through the finite state machineConstruct a human-readable message explaining what elements are permitted as transitions from this statevoid
-
Constructor Details
-
CountingState
-
-
Method Details
-
incrementCounter
- Throws:
ValidationException
-
testMinimumReached
- Throws:
ValidationException
-
getTransition
Description copied from interface:StateFind the edge representing the transition from this state to another state, that is triggered by a given input token- Specified by:
getTransitionin interfaceState- 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
public boolean isFinalState()Description copied from interface:StateAsk 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- Specified by:
isFinalStatein interfaceState- Returns:
- true if this is a valid final state
-
getUnderlyingState
-
listAllowedElements
Description copied from interface:StateConstruct a human-readable message explaining what elements are permitted as transitions from this state- Specified by:
listAllowedElementsin interfaceState- Returns:
- A message indicating what elements may come next
-
getWildcardEdges
Get an iterator over the wildcard transitions (edges) allowed from this state.- Specified by:
getWildcardEdgesin interfaceState- Returns:
- an Iterator over the edges that represent element wildcards. The objects
returned by this Iterator are
Edgeobjects.
-
getEdges
Get an iterator over all the transitions (edges) allowed from this state -
equals
-
hashCode
public int hashCode()
-