org.apache.lucene.util.packed

## Class PackedInts.Reader

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

- All Implemented Interfaces:
    Accountable
  Direct Known Subclasses:
    PackedInts.Mutable, PackedInts.NullReader
  Enclosing class:
    PackedInts

      public abstract static class PackedInts.Reader
      extends Object
      implements Accountable

  A read-only random access array of positive integers.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Reader()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract 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.
    `abstract 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, ramBytesUsed`

- - ### Constructor Detail

    - #### Reader

          public Reader()

  - ### Method Detail

    - #### get

          public abstract long get(int index)

      Get the long at the given index. Behavior is undefined for out-of-range indices.

    - #### get

          public 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.

    - #### size

          public abstract int size()

      Returns:
        the number of values.

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