org.apache.lucene.util.bkd

## Class PointReader

- java.lang.Object
- - org.apache.lucene.util.bkd.PointReader

- All Implemented Interfaces:
    Closeable, AutoCloseable
  Direct Known Subclasses:
    HeapPointReader, OfflinePointReader

      public abstract class PointReader
      extends Object
      implements Closeable

  One pass iterator through all points previously written with a `PointWriter`, abstracting away whether points a read from (offline) disk or simple arrays in heap.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PointReader()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int` | `docID()` DocID for this point
    `void` | `markOrds(long count, LongBitSet ordBitSet)` Iterates through the next `count` ords, marking them in the provided `ordBitSet`.
    `abstract boolean` | `next()` Returns false once iteration is done, else true.
    `abstract long` | `ord()` Point ordinal
    `abstract byte[]` | `packedValue()` Returns the packed byte[] value
    `long` | `split(long count, LongBitSet rightTree, PointWriter left, PointWriter right, boolean doClearBits)` Splits this reader into left and right partitions

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

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

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Constructor Detail

    - #### PointReader

          public PointReader()

  - ### Method Detail

    - #### next

          public abstract boolean next()
                                throws IOException

      Returns false once iteration is done, else true.
      Throws:
        `IOException`

    - #### packedValue

          public abstract byte[] packedValue()

      Returns the packed byte[] value

    - #### ord

          public abstract long ord()

      Point ordinal

    - #### docID

          public abstract int docID()

      DocID for this point

    - #### markOrds

          public void markOrds(long count,
                               LongBitSet ordBitSet)
                        throws IOException

      Iterates through the next `count` ords, marking them in the provided `ordBitSet`.
      Throws:
        `IOException`

    - #### split

          public long split(long count,
                            LongBitSet rightTree,
                            PointWriter left,
                            PointWriter right,
                            boolean doClearBits)
                     throws IOException

      Splits this reader into left and right partitions
      Throws:
        `IOException`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.