Package com.yahoo.document.update
Class AddValueUpdate
java.lang.Object
com.yahoo.document.update.ValueUpdate
com.yahoo.document.update.AddValueUpdate
Value update representing an addition of a value (possibly with an associated weight) to a multi-valued data type.
- Author:
- Einar M R Rosenvinge
-
Nested Class Summary
Nested classes/interfaces inherited from class com.yahoo.document.update.ValueUpdate
ValueUpdate.ValueUpdateClassID
-
Field Summary
Fields inherited from class com.yahoo.document.update.ValueUpdate
valueUpdateClassID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyTo
(FieldValue val) protected void
checkCompatibility
(DataType fieldType) boolean
getValue()
Returns the value of this value update.int
Return the associated weight of this value update.int
hashCode()
void
serialize
(DocumentUpdateWriter data, DataType superType) void
setValue
(FieldValue value) Sets the value of this.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 Details
-
value
-
weight
-
-
Constructor Details
-
AddValueUpdate
-
-
Method Details
-
getValue
Returns the value of this value update.- Specified by:
getValue
in classValueUpdate
- Returns:
- the value of this ValueUpdate
- See Also:
-
setValue
Description copied from class:ValueUpdate
Sets the value of this. Ignored by update who have no value- Specified by:
setValue
in classValueUpdate
-
getWeight
public int getWeight()Return the associated weight of this value update.- Returns:
- the weight of this value update, or 1 if unset
-
applyTo
- Specified by:
applyTo
in classValueUpdate
-
checkCompatibility
- Specified by:
checkCompatibility
in classValueUpdate
-
serialize
- Specified by:
serialize
in classValueUpdate
-
equals
- Overrides:
equals
in classValueUpdate
-
hashCode
public int hashCode()- Overrides:
hashCode
in classValueUpdate
-
toString
- Overrides:
toString
in classValueUpdate
-