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:
Cloneable
,Comparable<FieldValue>
A byte field value
- Author:
- Einar M R Rosenvinge
-
Field Summary
-
Constructor Summary
ConstructorDescriptionByteFieldValue
(byte value) ByteFieldValue
(Byte value) ByteFieldValue
(Integer value) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Assign this non-fieldvalue value to this field value.void
clear()
clone()
int
compareTo
(FieldValue fieldValue) void
deserialize
(Field field, FieldReader reader) Read a field value from the specified readerboolean
byte
getByte()
static PrimitiveDataType.Factory
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
Deprecated.void
serialize
(Field field, FieldWriter writer) Write out field value to the specified writertoString()
Methods inherited from class com.yahoo.document.datatypes.FieldValue
create, deserialize, getRecursiveValue, getRecursiveValue, onDeserialize, onSerialize, serialize, toXml
Methods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onGetClassId, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId, visitMembers
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
ByteFieldValue
public ByteFieldValue() -
ByteFieldValue
public ByteFieldValue(byte value) -
ByteFieldValue
-
ByteFieldValue
-
ByteFieldValue
-
-
Method Details
-
getFactory
-
clone
- Overrides:
clone
in classFieldValue
-
getNumber
- Specified by:
getNumber
in classNumericFieldValue
-
clear
public void clear()- Specified by:
clear
in classFieldValue
-
assign
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
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 themselves.- Overrides:
getWrappedValue
in classFieldValue
-
getDataType
- Specified by:
getDataType
in classFieldValue
-
printXml
Deprecated.- Specified by:
printXml
in classFieldValue
-
toString
- Overrides:
toString
in classcom.yahoo.vespa.objects.Identifiable
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
equals
- Overrides:
equals
in classcom.yahoo.vespa.objects.Identifiable
-
serialize
Description copied from class:FieldValue
Write out field value to the specified writer- Specified by:
serialize
in classFieldValue
-
deserialize
Description copied from class:FieldValue
Read a field value from the specified reader- Specified by:
deserialize
in classFieldValue
-
compareTo
- Specified by:
compareTo
in interfaceComparable<FieldValue>
- Overrides:
compareTo
in classFieldValue
-