org.elasticsearch.index.field.data
Class NumericFieldData<Doc extends NumericDocFieldData>

java.lang.Object
  extended by org.elasticsearch.index.field.data.FieldData<Doc>
      extended by org.elasticsearch.index.field.data.NumericFieldData<Doc>
Direct Known Subclasses:
ByteFieldData, DoubleFieldData, FloatFieldData, IntFieldData, LongFieldData, ShortFieldData

public abstract class NumericFieldData<Doc extends NumericDocFieldData>
extends FieldData<Doc>


Nested Class Summary
static interface NumericFieldData.DoubleValueInDocProc
           
static interface NumericFieldData.LongValueInDocProc
           
static interface NumericFieldData.MissingDoubleValueInDocProc
           
static interface NumericFieldData.MissingLongValueInDocProc
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.field.data.FieldData
FieldData.OrdinalInDocProc, FieldData.StringValueInDocProc, FieldData.StringValueProc
 
Constructor Summary
protected NumericFieldData(String fieldName)
           
 
Method Summary
 byte byteValue(int docId)
          Returns the value of the specified number as a byte.
 Doc docFieldData(int docId)
           
abstract  double doubleValue(int docId)
          Returns the value of the specified number as a double.
abstract  double[] doubleValues(int docId)
           
abstract  float floatValue(int docId)
          Returns the value of the specified number as a float.
abstract  void forEachValueInDoc(int docId, NumericFieldData.DoubleValueInDocProc proc)
           
abstract  void forEachValueInDoc(int docId, NumericFieldData.LongValueInDocProc proc)
           
abstract  void forEachValueInDoc(int docId, NumericFieldData.MissingDoubleValueInDocProc proc)
           
abstract  void forEachValueInDoc(int docId, NumericFieldData.MissingLongValueInDocProc proc)
           
abstract  int intValue(int docId)
          Returns the value of the specified number as an int.
abstract  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.
 
Methods inherited from class org.elasticsearch.index.field.data.FieldData
computeSizeInBytes, createFieldData, fieldName, forEachOrdinalInDoc, forEachValue, forEachValueInDoc, hasValue, load, multiValued, sizeInBytes, stringValue, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericFieldData

protected NumericFieldData(String fieldName)
Method Detail

intValue

public abstract int intValue(int docId)
Returns the value of the specified number as an int. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type int.

longValue

public abstract long longValue(int docId)
Returns the value of the specified number as a long. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type long.

floatValue

public abstract float floatValue(int docId)
Returns the value of the specified number as a float. This may involve rounding.

Returns:
the numeric value represented by this object after conversion to type float.

doubleValue

public abstract double doubleValue(int docId)
Returns the value of the specified number as a double. This may involve rounding.

Returns:
the numeric value represented by this object after conversion to type double.

byteValue

public byte byteValue(int docId)
Returns the value of the specified number as a byte. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type byte.

shortValue

public short shortValue(int docId)
Returns the value of the specified number as a short. This may involve rounding or truncation.

Returns:
the numeric value represented by this object after conversion to type short.

docFieldData

public Doc docFieldData(int docId)
Overrides:
docFieldData in class FieldData<Doc extends NumericDocFieldData>

doubleValues

public abstract double[] doubleValues(int docId)

forEachValueInDoc

public abstract void forEachValueInDoc(int docId,
                                       NumericFieldData.DoubleValueInDocProc proc)

forEachValueInDoc

public abstract void forEachValueInDoc(int docId,
                                       NumericFieldData.MissingDoubleValueInDocProc proc)

forEachValueInDoc

public abstract void forEachValueInDoc(int docId,
                                       NumericFieldData.LongValueInDocProc proc)

forEachValueInDoc

public abstract void forEachValueInDoc(int docId,
                                       NumericFieldData.MissingLongValueInDocProc proc)


Copyright © 2009-2012. All Rights Reserved.