Package com.yahoo.document.update
Class AssignValueUpdate
- java.lang.Object
-
- com.yahoo.document.update.ValueUpdate
-
- com.yahoo.document.update.AssignValueUpdate
-
public class AssignValueUpdate extends ValueUpdate
Value update that represents assigning a new value.
- Author:
- Einar M R Rosenvinge
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.document.update.ValueUpdate
ValueUpdate.ValueUpdateClassID
-
-
Field Summary
Fields Modifier and Type Field Description protected FieldValue
value
-
Fields inherited from class com.yahoo.document.update.ValueUpdate
valueUpdateClassID
-
-
Constructor Summary
Constructors Constructor Description AssignValueUpdate(FieldValue value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldValue
applyTo(FieldValue fval)
protected void
checkCompatibility(DataType fieldType)
boolean
equals(java.lang.Object o)
FieldValue
getValue()
Returns the value of this value update.int
hashCode()
void
serialize(DocumentUpdateWriter data, DataType superType)
void
setValue(FieldValue value)
Sets the value to assign.java.lang.String
toString()
-
Methods inherited from class com.yahoo.document.update.ValueUpdate
createAdd, createAdd, createAddAll, createAddAll, createAssign, createClear, createDecrement, createDecrement, createDivide, createDivide, createIncrement, createIncrement, createMap, createMultiply, createMultiply, createRemove, createRemoveAll, createRemoveAll, getValueUpdateClassID
-
-
-
-
Field Detail
-
value
protected FieldValue value
-
-
Constructor Detail
-
AssignValueUpdate
public AssignValueUpdate(FieldValue value)
-
-
Method Detail
-
getValue
public FieldValue getValue()
Returns the value of this value update.
The type of the value is defined by the type of this field in this documents DocumentType - a java.lang primitive wrapper for single value types, java.util.List for arrays and
WeightedSet
for weighted sets.- Specified by:
getValue
in classValueUpdate
- Returns:
- the value of this ValueUpdate
- See Also:
DataType
-
setValue
public void setValue(FieldValue value)
Sets the value to assign.
The type of the value must match the type of this field in this documents DocumentType - a java.lang primitive wrapper for single value types, java.util.List for arrays and
WeightedSet
for weighted sets.- Specified by:
setValue
in classValueUpdate
-
applyTo
public FieldValue applyTo(FieldValue fval)
- Specified by:
applyTo
in classValueUpdate
-
checkCompatibility
protected void checkCompatibility(DataType fieldType)
- Specified by:
checkCompatibility
in classValueUpdate
-
serialize
public void serialize(DocumentUpdateWriter data, DataType superType)
- Specified by:
serialize
in classValueUpdate
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classValueUpdate
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classValueUpdate
-
toString
public java.lang.String toString()
- Overrides:
toString
in classValueUpdate
-
-