- java.lang.Object
-
- org.apache.lucene.document.StoredValue
-
public final class StoredValue extends java.lang.Object
Abstraction around a stored value.- See Also:
IndexableField
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StoredValue.Type
Type of aStoredValue
.
-
Field Summary
Fields Modifier and Type Field Description private BytesRef
binaryValue
private double
doubleValue
private float
floatValue
private int
intValue
private long
longValue
private java.lang.String
stringValue
private StoredValue.Type
type
-
Constructor Summary
Constructors Constructor Description StoredValue(double value)
Ctor for double values.StoredValue(float value)
Ctor for float values.StoredValue(int value)
Ctor for integer values.StoredValue(long value)
Ctor for long values.StoredValue(java.lang.String value)
Ctor for binary values.StoredValue(BytesRef value)
Ctor for binary values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BytesRef
getBinaryValue()
Retrieve a binary value.double
getDoubleValue()
Retrieve a double value.float
getFloatValue()
Retrieve a float value.int
getIntValue()
Retrieve an integer value.long
getLongValue()
Retrieve a long value.java.lang.String
getStringValue()
Retrieve a string value.StoredValue.Type
getType()
Retrieve the type of the stored value.void
setBinaryValue(BytesRef value)
Set a binary value.void
setDoubleValue(double value)
Set a double value.void
setFloatValue(float value)
Set a float value.void
setIntValue(int value)
Set an integer value.void
setLongValue(long value)
Set a long value.void
setStringValue(java.lang.String value)
Set a string value.
-
-
-
Field Detail
-
type
private final StoredValue.Type type
-
intValue
private int intValue
-
longValue
private long longValue
-
floatValue
private float floatValue
-
doubleValue
private double doubleValue
-
binaryValue
private BytesRef binaryValue
-
stringValue
private java.lang.String stringValue
-
-
Constructor Detail
-
StoredValue
public StoredValue(int value)
Ctor for integer values.
-
StoredValue
public StoredValue(long value)
Ctor for long values.
-
StoredValue
public StoredValue(float value)
Ctor for float values.
-
StoredValue
public StoredValue(double value)
Ctor for double values.
-
StoredValue
public StoredValue(BytesRef value)
Ctor for binary values.
-
StoredValue
public StoredValue(java.lang.String value)
Ctor for binary values.
-
-
Method Detail
-
getType
public StoredValue.Type getType()
Retrieve the type of the stored value.
-
setIntValue
public void setIntValue(int value)
Set an integer value.
-
setLongValue
public void setLongValue(long value)
Set a long value.
-
setFloatValue
public void setFloatValue(float value)
Set a float value.
-
setDoubleValue
public void setDoubleValue(double value)
Set a double value.
-
setBinaryValue
public void setBinaryValue(BytesRef value)
Set a binary value.
-
setStringValue
public void setStringValue(java.lang.String value)
Set a string value.
-
getIntValue
public int getIntValue()
Retrieve an integer value.
-
getLongValue
public long getLongValue()
Retrieve a long value.
-
getFloatValue
public float getFloatValue()
Retrieve a float value.
-
getDoubleValue
public double getDoubleValue()
Retrieve a double value.
-
getBinaryValue
public BytesRef getBinaryValue()
Retrieve a binary value.
-
getStringValue
public java.lang.String getStringValue()
Retrieve a string value.
-
-