Package com.yahoo.document.datatypes
Class ByteFieldValue
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.datatypes.FieldValue
-
- com.yahoo.document.datatypes.NumericFieldValue
-
- com.yahoo.document.datatypes.ByteFieldValue
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<FieldValue>
public class ByteFieldValue extends NumericFieldValue
A byte field value- Author:
- Einar M R Rosenvinge
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description ByteFieldValue()
ByteFieldValue(byte value)
ByteFieldValue(java.lang.Byte value)
ByteFieldValue(java.lang.Integer value)
ByteFieldValue(java.lang.String s)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assign(java.lang.Object o)
Assign this non-fieldvalue value to this field value.void
clear()
ByteFieldValue
clone()
int
compareTo(FieldValue fieldValue)
void
deserialize(Field field, FieldReader reader)
Read a field value from the specified readerboolean
equals(java.lang.Object o)
byte
getByte()
DataType
getDataType()
static PrimitiveDataType.Factory
getFactory()
java.lang.Number
getNumber()
java.lang.Object
getWrappedValue()
Used to retrieve wrapped type for simple types, such that you can use get methods to retrieve ints and floats directly instead of Int/Float field values.int
hashCode()
void
printXml(XmlStream xml)
void
serialize(Field field, FieldWriter writer)
Write out field value to the specified writerjava.lang.String
toString()
-
Methods inherited from class com.yahoo.document.datatypes.FieldValue
create, deserialize, getRecursiveValue, getRecursiveValue, onDeserialize, onSerialize, serialize, toXml
-
-
-
-
Method Detail
-
getFactory
public static PrimitiveDataType.Factory getFactory()
-
clone
public ByteFieldValue clone()
- Overrides:
clone
in classFieldValue
-
getNumber
public java.lang.Number getNumber()
- Specified by:
getNumber
in classNumericFieldValue
-
clear
public void clear()
- Specified by:
clear
in classFieldValue
-
assign
public void assign(java.lang.Object o)
Description copied from class:FieldValue
Assign this non-fieldvalue value to this field value. This is used to be able to assign ints to Integer field values and List to Array field values and such.Override to accept the specific types that should be legal.
- Specified by:
assign
in classFieldValue
-
getByte
public byte getByte()
-
getWrappedValue
public java.lang.Object getWrappedValue()
Description copied from class:FieldValue
Used to retrieve wrapped type for simple types, such that you can use get methods to retrieve ints and floats directly instead of Int/Float field values. Complex types that can't be specified by simple java types just return themself.- Overrides:
getWrappedValue
in classFieldValue
-
getDataType
public DataType getDataType()
- Specified by:
getDataType
in classFieldValue
-
printXml
public void printXml(XmlStream xml)
- Specified by:
printXml
in classFieldValue
-
toString
public java.lang.String toString()
- Overrides:
toString
in classcom.yahoo.vespa.objects.Identifiable
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classcom.yahoo.vespa.objects.Identifiable
-
serialize
public void serialize(Field field, FieldWriter writer)
Description copied from class:FieldValue
Write out field value to the specified writer- Specified by:
serialize
in classFieldValue
-
deserialize
public void deserialize(Field field, FieldReader reader)
Description copied from class:FieldValue
Read a field value from the specified reader- Specified by:
deserialize
in classFieldValue
-
compareTo
public int compareTo(FieldValue fieldValue)
- Specified by:
compareTo
in interfacejava.lang.Comparable<FieldValue>
- Overrides:
compareTo
in classFieldValue
-
-