ObjectTupleCursor (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.document.column, class: ObjectTupleCursor

Package org.apache.lucene.document.column

# Class ObjectTupleCursor<T>

java.lang.Object
org.apache.lucene.document.column.ObjectTupleCursor<T>

Type Parameters:
  `T` - the value type

public abstract class ObjectTupleCursor<T> extends Object
A tuple cursor over a `Column` whose values are objects. Yields `(docID, value)` pairs. Batch-local doc-ids are returned in non-decreasing order; the same doc-id may repeat for multi-valued fields (e.g. `SORTED_SET`). Single-valued columns (e.g. `VectorColumn`) emit each doc-id at most once.

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObjectTupleCursor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract int`
  `nextDoc()`
  Advances to the next tuple and returns its doc-id, or `DocIdSetIterator.NO_MORE_DOCS` if exhausted.
  `abstract T`
  `value()`
  Returns the value at the current cursor position.

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

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

- ## Constructor Details

  - ### ObjectTupleCursor

    public ObjectTupleCursor()

- ## Method Details

  - ### nextDoc

    public abstract int nextDoc()
    Advances to the next tuple and returns its doc-id, or `DocIdSetIterator.NO_MORE_DOCS` if exhausted.

    Returned doc-ids are batch-local (0 to `numDocs - 1`) and are emitted in non-decreasing order. The same doc-id may be returned multiple times when a document has multiple values.

  - ### value

    public abstract T value()
    Returns the value at the current cursor position. Only valid until the next call to `nextDoc()`, and only after a `nextDoc()` that returned a value other than `DocIdSetIterator.NO_MORE_DOCS`.