org.apache.lucene.util

## Class LongValues

- java.lang.Object
- - org.apache.lucene.index.NumericDocValues
  - - org.apache.lucene.util.LongValues

- Direct Known Subclasses:
    BlockPackedReader, MonotonicBlockPackedReader, PackedLongValues, PagedGrowableWriter, PagedMutable

      public abstract class LongValues
      extends NumericDocValues

  Abstraction over an array of longs. This class extends NumericDocValues so that we don't need to add another level of abstraction every time we want eg. to use the `PackedInts` utility classes to represent a `NumericDocValues` instance.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static LongValues` | `IDENTITY` An instance that returns the provided value.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LongValues()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `get(int idx)` Returns the numeric value for the specified document ID.
    `abstract long` | `get(long index)` Get value at `index`.

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

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

- - ### Field Detail

    - #### IDENTITY

          public static final LongValues IDENTITY

      An instance that returns the provided value.

  - ### Constructor Detail

    - #### LongValues

          public LongValues()

  - ### Method Detail

    - #### get

          public abstract long get(long index)

      Get value at `index`.

    - #### get

          public long get(int idx)

      Description copied from class: `NumericDocValues`
      Returns the numeric value for the specified document ID.
      Specified by:
        `get` in class `NumericDocValues`
      Parameters:
        `idx` - document ID to lookup
      Returns:
        numeric value

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