OffsetsEnum.OfMatchesIterator (Lucene 10.5.1 highlighter API)
Description: declaration: package: org.apache.lucene.search.uhighlight, class: OffsetsEnum, class: OfMatchesIterator

Package org.apache.lucene.search.uhighlight

# Class OffsetsEnum.OfMatchesIterator

java.lang.Object
org.apache.lucene.search.uhighlight.OffsetsEnum
org.apache.lucene.search.uhighlight.OffsetsEnum.OfMatchesIterator

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `Comparable<OffsetsEnum>`

Enclosing class:
  `OffsetsEnum`

public static class OffsetsEnum.OfMatchesIterator extends OffsetsEnum
Based on a `MatchesIterator`; does not look at submatches.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum

  `OffsetsEnum.MultiOffsetsEnum, OffsetsEnum.OfMatchesIterator, OffsetsEnum.OfMatchesIteratorWithSubs, OffsetsEnum.OfPostings`

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum

  `EMPTY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OfMatchesIterator(MatchesIterator matchesIterator, Supplier<BytesRef> termSupplier)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `endOffset()`
  `int`
  `freq()`
  An estimate of the number of occurrences of this term/OffsetsEnum.
  `BytesRef`
  `getTerm()`
  The term at this position.
  `boolean`
  `nextPosition()`
  Advances to the next position and returns true, or if can't then returns false.
  `int`
  `startOffset()`

  ### Methods inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum

  `close, compareTo, toString`

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

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

- ## Constructor Details

  - ### OfMatchesIterator

    public OfMatchesIterator(MatchesIterator matchesIterator, Supplier<BytesRef> termSupplier)

- ## Method Details

  - ### nextPosition

    public boolean nextPosition() throws IOException
    Description copied from class: `OffsetsEnum`
    Advances to the next position and returns true, or if can't then returns false. Note that the initial state of this class is not positioned.
    Specified by:
      `nextPosition` in class `OffsetsEnum`
    Throws:
      `IOException`

  - ### freq

    public int freq() throws IOException
    Description copied from class: `OffsetsEnum`
    An estimate of the number of occurrences of this term/OffsetsEnum.
    Specified by:
      `freq` in class `OffsetsEnum`
    Throws:
      `IOException`

  - ### getTerm

    public BytesRef getTerm() throws IOException
    Description copied from class: `OffsetsEnum`
    The term at this position. This BytesRef is safe to continue to refer to, even after we move to the next position.
    Specified by:
      `getTerm` in class `OffsetsEnum`
    Throws:
      `IOException`
    See Also:
      - `Passage.getMatchTerms()`

  - ### startOffset

    public int startOffset() throws IOException
    Specified by:
      `startOffset` in class `OffsetsEnum`
    Throws:
      `IOException`

  - ### endOffset

    public int endOffset() throws IOException
    Specified by:
      `endOffset` in class `OffsetsEnum`
    Throws:
      `IOException`