LengthOrdinalIterator (Lucene 10.5.0 sandbox API)
Description: declaration: package: org.apache.lucene.sandbox.facet.iterators, class: LengthOrdinalIterator

Package org.apache.lucene.sandbox.facet.iterators

# Class LengthOrdinalIterator

java.lang.Object
org.apache.lucene.sandbox.facet.iterators.LengthOrdinalIterator

All Implemented Interfaces:
  `OrdinalIterator`

public final class LengthOrdinalIterator extends Object implements OrdinalIterator
`OrdinalIterator` passes through all ordinals as is and counts them.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Field Summary

  ### Fields inherited from interface org.apache.lucene.sandbox.facet.iterators.OrdinalIterator

  `EMPTY, NO_MORE_ORDS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LengthOrdinalIterator(OrdinalIterator delegate)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `length()`
  Number of ordinals in the delegate.
  `int`
  `nextOrd()`
  Returns next ord or `OrdinalIterator.NO_MORE_ORDS`.

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

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

  ### Methods inherited from interface org.apache.lucene.sandbox.facet.iterators.OrdinalIterator

  `toArray`

- ## Constructor Details

  - ### LengthOrdinalIterator

    public LengthOrdinalIterator(OrdinalIterator delegate) throws IOException
    Constructor.
    Throws:
      `IOException`

- ## Method Details

  - ### length

    public int length()
    Number of ordinals in the delegate.

  - ### nextOrd

    public int nextOrd() throws IOException
    Description copied from interface: `OrdinalIterator`
    Returns next ord or `OrdinalIterator.NO_MORE_ORDS`. *
    Specified by:
      `nextOrd` in interface `OrdinalIterator`
    Throws:
      `IOException`