org.elasticsearch.index.field.data.floats
Class FloatFieldData
java.lang.Object
org.elasticsearch.index.field.data.FieldData<Doc>
org.elasticsearch.index.field.data.NumericFieldData<FloatDocFieldData>
org.elasticsearch.index.field.data.floats.FloatFieldData
- Direct Known Subclasses:
- MultiValueFloatFieldData, SingleValueFloatFieldData
public abstract class FloatFieldData
- extends NumericFieldData<FloatDocFieldData>
Field Summary |
protected float[] |
values
|
Constructor Summary |
protected |
FloatFieldData(java.lang.String fieldName,
float[] values)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
values
protected final float[] values
FloatFieldData
protected FloatFieldData(java.lang.String fieldName,
float[] values)
computeSizeInBytes
protected long computeSizeInBytes()
- Specified by:
computeSizeInBytes
in class FieldData<FloatDocFieldData>
values
public final float[] values()
value
public abstract float value(int docId)
values
public abstract float[] values(int docId)
docFieldData
public FloatDocFieldData docFieldData(int docId)
- Overrides:
docFieldData
in class NumericFieldData<FloatDocFieldData>
createFieldData
protected FloatDocFieldData createFieldData()
- Specified by:
createFieldData
in class FieldData<FloatDocFieldData>
stringValue
public java.lang.String stringValue(int docId)
- Specified by:
stringValue
in class FieldData<FloatDocFieldData>
forEachValue
public void forEachValue(FieldData.StringValueProc proc)
- Specified by:
forEachValue
in class FieldData<FloatDocFieldData>
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<FloatDocFieldData>
- 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<FloatDocFieldData>
- 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<FloatDocFieldData>
- 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<FloatDocFieldData>
- 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<FloatDocFieldData>
- 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<FloatDocFieldData>
- 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<FloatDocFieldData>
forEachValue
public void forEachValue(FloatFieldData.ValueProc proc)
forEachValueInDoc
public abstract void forEachValueInDoc(int docId,
FloatFieldData.ValueInDocProc proc)
load
public static FloatFieldData load(org.apache.lucene.index.IndexReader reader,
java.lang.String field)
throws java.io.IOException
- Throws:
java.io.IOException