## com.saxonica.fsa
Class CountingState

    java.lang.Object
      com.saxonica.fsa.CountingState

All Implemented Interfaces:
  State

    public class CountingState

extends java.lang.Object
implements State

A counting state is a dynamic object representing the combination of an AutomatonState and a counter value

Constructor Summary
`CountingState(AutomatonState as, int startFrom)`

Method Summary
`boolean` `equals(java.lang.Object obj)`
`java.util.Iterator` `getEdges()` Get an iterator over all the transitions (edges) allowed from this state
`Edge` `getTransition(int token, NamePool pool)` Find the edge representing the transition from this state to another state, that is triggered by a given input token
`AutomatonState` `getUnderlyingState()`
`Edge[]` `getWildcardEdges()` Get an iterator over the wildcard transitions (edges) allowed from this state.
`State` `incrementCounter()`
`boolean` `isFinalState()`
`java.lang.CharSequence` `listAllowedElements()`
`void` `testMinimumReached()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CountingState

    public CountingState(AutomatonState as,
                         int startFrom)

Method Detail

### incrementCounter

    public State incrementCounter()
                           throws ValidationException

  Throws:
    `ValidationException`

### testMinimumReached

    public void testMinimumReached()
                            throws ValidationException

  Throws:
    `ValidationException`

### getTransition

    public Edge getTransition(int token,
                              NamePool pool)

  Description copied from interface: `State`
  Find the edge representing the transition from this state to another state, that is triggered by a given input token

  Specified by:
    `getTransition` in interface `State`
  Parameters:
    `token` - the input token, specifically the fingerprint of an element name
    `pool` - the Name Pool
  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()

  Specified by:
    `isFinalState` in interface `State`

### getUnderlyingState

    public AutomatonState getUnderlyingState()

### listAllowedElements

    public java.lang.CharSequence listAllowedElements()

  Specified by:
    `listAllowedElements` in interface `State`

### getWildcardEdges

    public Edge[] getWildcardEdges()

  Get an iterator over the wildcard transitions (edges) allowed from this state.

  Specified by:
    `getWildcardEdges` in interface `State`
  Returns:
    an Iterator over the edges that represent element wildcards. The objects returned by this Iterator are `Edge` objects.

### getEdges

    public java.util.Iterator getEdges()

  Get an iterator over all the transitions (edges) allowed from this state

  Specified by:
    `getEdges` in interface `State`
  Returns:
    an Iterator over all the edges from this state. The objects returned by this Iterator are `Edge` objects.

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

Copyright (c) Saxonica Limited. All rights reserved.