org.elasticsearch.index.field.data.doubles
Class DoubleFieldData

java.lang.Object
  extended by org.elasticsearch.index.field.data.FieldData<Doc>
      extended by org.elasticsearch.index.field.data.NumericFieldData<DoubleDocFieldData>
          extended by org.elasticsearch.index.field.data.doubles.DoubleFieldData
Direct Known Subclasses:
MultiValueDoubleFieldData, SingleValueDoubleFieldData

public abstract class DoubleFieldData
extends NumericFieldData<DoubleDocFieldData>


Nested Class Summary
static interface DoubleFieldData.ValueInDocProc
           
static interface DoubleFieldData.ValueProc
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.field.data.NumericFieldData
NumericFieldData.DoubleValueInDocProc, NumericFieldData.LongValueInDocProc, NumericFieldData.MissingDoubleValueInDocProc, NumericFieldData.MissingLongValueInDocProc
 
Nested classes/interfaces inherited from class org.elasticsearch.index.field.data.FieldData
FieldData.OrdinalInDocProc, FieldData.StringValueInDocProc, FieldData.StringValueProc
 
Field Summary
static double[] EMPTY_DOUBLE_ARRAY
           
protected  double[] values
           
 
Constructor Summary
protected DoubleFieldData(java.lang.String fieldName, double[] values)
           
 
Method Summary
 byte byteValue(int docId)
          Returns the value of the specified number as a byte.
protected  long computeSizeInBytes()
           
protected  DoubleDocFieldData createFieldData()
           
 DoubleDocFieldData docFieldData(int docId)
           
 double doubleValue(int docId)
          Returns the value of the specified number as a double.
 float floatValue(int docId)
          Returns the value of the specified number as a float.
 void forEachValue(DoubleFieldData.ValueProc proc)
           
 void forEachValue(FieldData.StringValueProc proc)
           
abstract  void forEachValueInDoc(int docId, DoubleFieldData.ValueInDocProc proc)
           
 int intValue(int docId)
          Returns the value of the specified number as an int.
static DoubleFieldData load(org.apache.lucene.index.IndexReader reader, java.lang.String field)
           
 long longValue(int docId)
          Returns the value of the specified number as a long.
 short shortValue(int docId)
          Returns the value of the specified number as a short.
 java.lang.String stringValue(int docId)
           
 FieldDataType type()
          The type of this field data.
abstract  double value(int docId)
           
 double[] values()
           
abstract  double[] values(int docId)
           
 
Methods inherited from class org.elasticsearch.index.field.data.NumericFieldData
doubleValues, forEachValueInDoc, forEachValueInDoc, forEachValueInDoc, forEachValueInDoc
 
Methods inherited from class org.elasticsearch.index.field.data.FieldData
fieldName, forEachOrdinalInDoc, forEachValueInDoc, hasValue, load, multiValued, sizeInBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_DOUBLE_ARRAY

public static final double[] EMPTY_DOUBLE_ARRAY

values

protected final double[] values
Constructor Detail

DoubleFieldData

protected DoubleFieldData(java.lang.String fieldName,
                          double[] values)
Method Detail

computeSizeInBytes

protected long computeSizeInBytes()
Specified by:
computeSizeInBytes in class FieldData<DoubleDocFieldData>

values

public final double[] values()

value

public abstract double value(int docId)

values

public abstract double[] values(int docId)

docFieldData

public DoubleDocFieldData docFieldData(int docId)
Overrides:
docFieldData in class NumericFieldData<DoubleDocFieldData>

createFieldData

protected DoubleDocFieldData createFieldData()
Specified by:
createFieldData in class FieldData<DoubleDocFieldData>

stringValue

public java.lang.String stringValue(int docId)
Specified by:
stringValue in class FieldData<DoubleDocFieldData>

forEachValue

public void forEachValue(FieldData.StringValueProc proc)
Specified by:
forEachValue in class FieldData<DoubleDocFieldData>

byteValue

public byte byteValue(int docId)
Description copied from class: NumericFieldData
Returns the value of the specified number as a byte. This may involve rounding or truncation.

Overrides:
byteValue in class NumericFieldData<DoubleDocFieldData>
Returns:
the numeric value represented by this object after conversion to type byte.

shortValue

public short shortValue(int docId)
Description copied from class: NumericFieldData
Returns the value of the specified number as a short. This may involve rounding or truncation.

Overrides:
shortValue in class NumericFieldData<DoubleDocFieldData>
Returns:
the numeric value represented by this object after conversion to type short.

intValue

public int intValue(int docId)
Description copied from class: NumericFieldData
Returns the value of the specified number as an int. This may involve rounding or truncation.

Specified by:
intValue in class NumericFieldData<DoubleDocFieldData>
Returns:
the numeric value represented by this object after conversion to type int.

longValue

public long longValue(int docId)
Description copied from class: NumericFieldData
Returns the value of the specified number as a long. This may involve rounding or truncation.

Specified by:
longValue in class NumericFieldData<DoubleDocFieldData>
Returns:
the numeric value represented by this object after conversion to type long.

floatValue

public float floatValue(int docId)
Description copied from class: NumericFieldData
Returns the value of the specified number as a float. This may involve rounding.

Specified by:
floatValue in class NumericFieldData<DoubleDocFieldData>
Returns:
the numeric value represented by this object after conversion to type float.

doubleValue

public double doubleValue(int docId)
Description copied from class: NumericFieldData
Returns the value of the specified number as a double. This may involve rounding.

Specified by:
doubleValue in class NumericFieldData<DoubleDocFieldData>
Returns:
the numeric value represented by this object after conversion to type double.

type

public FieldDataType type()
Description copied from class: FieldData
The type of this field data.

Specified by:
type in class FieldData<DoubleDocFieldData>

forEachValue

public void forEachValue(DoubleFieldData.ValueProc proc)

forEachValueInDoc

public abstract void forEachValueInDoc(int docId,
                                       DoubleFieldData.ValueInDocProc proc)

load

public static DoubleFieldData load(org.apache.lucene.index.IndexReader reader,
                                   java.lang.String field)
                            throws java.io.IOException
Throws:
java.io.IOException