TransitionAccessor (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util.automaton, interface: TransitionAccessor

Package org.apache.lucene.util.automaton

# Interface TransitionAccessor

All Known Implementing Classes:
  `Automaton`, `NFARunAutomaton`

public interface TransitionAccessor
Interface accessing the transitions of an automaton

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `getNextTransition(Transition t)`
  Iterate to the next transition after the provided one
  `int`
  `getNumTransitions(int state)`
  How many transitions this state has.
  `void`
  `getTransition(int state, int index, Transition t)`
  Fill the provided `Transition` with the index'th transition leaving the specified state.
  `int`
  `initTransition(int state, Transition t)`
  Initialize the provided Transition to iterate through all transitions leaving the specified state.

- ## Method Details

  - ### initTransition

    int initTransition(int state, Transition t)
    Initialize the provided Transition to iterate through all transitions leaving the specified state. You must call `getNextTransition(org.apache.lucene.util.automaton.Transition)` to get each transition. Returns the number of transitions leaving this state.

  - ### getNextTransition

    void getNextTransition(Transition t)
    Iterate to the next transition after the provided one

  - ### getNumTransitions

    int getNumTransitions(int state)
    How many transitions this state has.

  - ### getTransition

    void getTransition(int state, int index, Transition t)
    Fill the provided `Transition` with the index'th transition leaving the specified state.