PackedInts.NullReader (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.util.packed, class: PackedInts, class: NullReader

Package org.apache.lucene.util.packed

# Class PackedInts.NullReader

java.lang.Object
org.apache.lucene.util.packed.PackedInts.Reader
org.apache.lucene.util.packed.PackedInts.NullReader

All Implemented Interfaces:
  `Accountable`

Enclosing class:
  `PackedInts`

public static final class PackedInts.NullReader extends PackedInts.Reader
A `PackedInts.Reader` which has all its values equal to 0 (bitsPerValue = 0).

- ## Field Summary

  ### Fields inherited from interface org.apache.lucene.util.Accountable

  `NULL_ACCOUNTABLE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static PackedInts.NullReader`
  `forCount(int valueCount)`
  `long`
  `get(int index)`
  Get the long at the given index.
  `int`
  `get(int index, long[] arr, int off, int len)`
  Bulk get: read at least one and at most `len` longs starting from `index` into `arr[off:off+len]` and return the actual number of values that have been read.
  `long`
  `ramBytesUsed()`
  Returns an estimate of the JVM heap memory used by this object in bytes.
  `int`
  `size()`

  ### 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.util.Accountable

  `getChildResources`

- ## Method Details

  - ### forCount

    public static PackedInts.NullReader forCount(int valueCount)

  - ### get

    public long get(int index)
    Description copied from class: `PackedInts.Reader`
    Get the long at the given index. Behavior is undefined for out-of-range indices.
    Specified by:
      `get` in class `PackedInts.Reader`

  - ### get

    public int get(int index, long[] arr, int off, int len)
    Description copied from class: `PackedInts.Reader`
    Bulk get: read at least one and at most `len` longs starting from `index` into `arr[off:off+len]` and return the actual number of values that have been read.
    Overrides:
      `get` in class `PackedInts.Reader`

  - ### size

    public int size()
    Specified by:
      `size` in class `PackedInts.Reader`
    Returns:
      the number of values.

  - ### ramBytesUsed

    public long ramBytesUsed()
    Description copied from interface: `Accountable`
    Returns an estimate of the JVM heap memory used by this object in bytes. The method name uses "ram" for historical reasons; only JVM heap memory should be reported. Off-heap resources such as memory-mapped files or native direct buffers should not be included. Negative values are illegal.