org.apache.lucene.search

## Class DoubleValues

- java.lang.Object
- - org.apache.lucene.search.DoubleValues

-     public abstract class DoubleValues
      extends Object

  Per-segment, per-document double values, which can be calculated at search-time

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DoubleValues` | `EMPTY` An empty DoubleValues instance that always returns `false` from `advanceExact(int)`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DoubleValues()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `advanceExact(int doc)` Advance this instance to the given document id
    `abstract double` | `doubleValue()` Get the double value for the current document
    `static DoubleValues` | `withDefault(DoubleValues in, double missingValue)` Wrap a DoubleValues instance, returning a default if the wrapped instance has no value

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

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

- - ### Field Detail

    - #### EMPTY

          public static final DoubleValues EMPTY

      An empty DoubleValues instance that always returns `false` from `advanceExact(int)`

  - ### Constructor Detail

    - #### DoubleValues

          public DoubleValues()

  - ### Method Detail

    - #### doubleValue

          public abstract double doubleValue()
                                      throws IOException

      Get the double value for the current document
      Throws:
        `IOException`

    - #### advanceExact

          public abstract boolean advanceExact(int doc)
                                        throws IOException

      Advance this instance to the given document id
      Returns:
        true if there is a value for this document
      Throws:
        `IOException`

    - #### withDefault

          public static DoubleValues withDefault(DoubleValues in,
                                                 double missingValue)

      Wrap a DoubleValues instance, returning a default if the wrapped instance has no value

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