org.apache.lucene.spatial.util

## Class CachingDoubleValueSource

- java.lang.Object
- - org.apache.lucene.queries.function.ValueSource
  - - org.apache.lucene.spatial.util.CachingDoubleValueSource

    public class CachingDoubleValueSource
    extends ValueSource

Caches the doubleVal of another value source in a HashMap so that it is computed only once.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

### Constructor Summary

Constructors
Constructor and Description
`CachingDoubleValueSource(ValueSource source)`

### Method Summary

Methods
`String` `description()`
`boolean` `equals(Object o)`
`FunctionValues` `getValues(Map context, AtomicReaderContext readerContext)`
`int` `hashCode()`

### Methods inherited from class org.apache.lucene.queries.function.ValueSource

`createWeight, getSortField, newContext, toString`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CachingDoubleValueSource

    public CachingDoubleValueSource(ValueSource source)

### Method Detail

#### description

    public String description()

Specified by:
  `description` in class `ValueSource`

#### getValues

    public FunctionValues getValues(Map context,
                           AtomicReaderContext readerContext)
                             throws IOException

Specified by:
  `getValues` in class `ValueSource`
Throws:
  `IOException`

#### equals

    public boolean equals(Object o)

Specified by:
  `equals` in class `ValueSource`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in class `ValueSource`