Interface Automaton.Trace<L>

Type Parameters:
L - the label type of the states of the underlying automaton
All Known Implementing Classes:
DAutomaton.Trace, NAutomaton.Trace, ZAutomaton.Trace
Enclosing class:
Automaton<L,T>

public static interface Automaton.Trace<L>
Iterator-like mutable API for tracking the consumption of an input sequence of code points by an automaton.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the label associated with the current state(s).
    void
    Jumps to the initial state(s).
    boolean
    step(int codePoint)
    Attempts a state transition by consuming one code point.
  • Method Details

    • restart

      void restart()
      Jumps to the initial state(s).
    • step

      boolean step(int codePoint)
      Attempts a state transition by consuming one code point.
      Parameters:
      codePoint - the code point to consume
      Returns:
      true if the transition was successful; false otherwise
      Throws:
      IllegalStateException - if the last transition has failed
      See Also:
    • getLabel

      L getLabel()
      Returns the label associated with the current state(s).
      Returns:
      the label associated with the current state(s)
      Throws:
      IllegalStateException - if the last transition has failed