FST.Arc (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util.fst, class: FST, class: Arc

Package org.apache.lucene.util.fst

# Class FST.Arc<T>

java.lang.Object
org.apache.lucene.util.fst.FST.Arc<T>

Enclosing class:
  `FST<T>`

public static final class FST.Arc<T> extends Object
Represents a single arc.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Arc()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `arcIdx()`
  Where we are in the array; only valid if bytesPerArc != 0.
  `int`
  `bytesPerArc()`
  Non-zero if this arc is part of a node with fixed length arcs, which means all arcs for the node are encoded with a fixed number of bytes so that we binary search or direct address.
  `FST.Arc<T>`
  `copyFrom(FST.Arc<T> other)`
  Returns this
  `byte`
  `flags()`
  `boolean`
  `isFinal()`
  `boolean`
  `isLast()`
  `int`
  `label()`
  `T`
  `nextFinalOutput()`
  `byte`
  `nodeFlags()`
  Node header flags.
  `int`
  `numArcs()`
  How many arcs; only valid if bytesPerArc != 0 (fixed length arcs).
  `T`
  `output()`
  `long`
  `posArcsStart()`
  Where the first arc in the array starts; only valid if bytesPerArc != 0
  `long`
  `target()`
  Ord/address to target node.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Arc

    public Arc()

- ## Method Details

  - ### copyFrom

    public FST.Arc<T> copyFrom(FST.Arc<T> other)
    Returns this

  - ### isLast

    public boolean isLast()

  - ### isFinal

    public boolean isFinal()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### label

    public int label()

  - ### output

    public T output()

  - ### target

    public long target()
    Ord/address to target node.

  - ### flags

    public byte flags()

  - ### nextFinalOutput

    public T nextFinalOutput()

  - ### arcIdx

    public int arcIdx()
    Where we are in the array; only valid if bytesPerArc != 0.

  - ### nodeFlags

    public byte nodeFlags()
    Node header flags. Only meaningful to check if the value is either `FST.ARCS_FOR_BINARY_SEARCH` or `FST.ARCS_FOR_DIRECT_ADDRESSING` or `FST.ARCS_FOR_CONTINUOUS` (other value when bytesPerArc == 0).

  - ### posArcsStart

    public long posArcsStart()
    Where the first arc in the array starts; only valid if bytesPerArc != 0

  - ### bytesPerArc

    public int bytesPerArc()
    Non-zero if this arc is part of a node with fixed length arcs, which means all arcs for the node are encoded with a fixed number of bytes so that we binary search or direct address. We do when there are enough arcs leaving one node. It wastes some bytes but gives faster lookups.

  - ### numArcs

    public int numArcs()
    How many arcs; only valid if bytesPerArc != 0 (fixed length arcs). For a node designed for binary search this is the array size. For a node designed for direct addressing, this is the label range.