Package com.yahoo.document.update
Class ArithmeticValueUpdate
java.lang.Object
com.yahoo.document.update.ValueUpdate<DoubleFieldValue>
com.yahoo.document.update.ArithmeticValueUpdate
Value update representing an arithmetic operation on a numeric data type.
- Author:
- Einar M R Rosenvinge
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Lists valid operations that can be performed by an ArithmeticValueUpdate.Nested classes/interfaces inherited from class com.yahoo.document.update.ValueUpdate
ValueUpdate.ValueUpdateClassID
-
Field Summary
Modifier and TypeFieldDescriptionprotected DoubleFieldValue
protected ArithmeticValueUpdate.Operator
Fields inherited from class com.yahoo.document.update.ValueUpdate
valueUpdateClassID
-
Constructor Summary
ConstructorDescriptionArithmeticValueUpdate
(ArithmeticValueUpdate.Operator operator, DoubleFieldValue operand) ArithmeticValueUpdate
(ArithmeticValueUpdate.Operator operator, Number operand) -
Method Summary
Modifier and TypeMethodDescriptionapplyTo
(FieldValue oldValue) protected void
checkCompatibility
(DataType fieldType) boolean
Returns the operand of this arithmetic value update.Returns the operator of this arithmatic value update.getValue()
Returns the operandint
hashCode()
void
serialize
(DocumentUpdateWriter data, DataType superType) void
setValue
(DoubleFieldValue value) Sets the operandtoString()
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
-
operator
-
operand
-
-
Constructor Details
-
ArithmeticValueUpdate
-
ArithmeticValueUpdate
-
-
Method Details
-
getOperator
Returns the operator of this arithmatic value update.- Returns:
- the operator
- See Also:
-
getOperand
Returns the operand of this arithmetic value update.- Returns:
- the operand
-
getValue
Returns the operand- Specified by:
getValue
in classValueUpdate<DoubleFieldValue>
-
setValue
Sets the operand- Specified by:
setValue
in classValueUpdate<DoubleFieldValue>
-
applyTo
- Specified by:
applyTo
in classValueUpdate<DoubleFieldValue>
-
checkCompatibility
- Specified by:
checkCompatibility
in classValueUpdate<DoubleFieldValue>
-
serialize
- Specified by:
serialize
in classValueUpdate<DoubleFieldValue>
-
equals
- Overrides:
equals
in classValueUpdate<DoubleFieldValue>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classValueUpdate<DoubleFieldValue>
-
toString
- Overrides:
toString
in classValueUpdate<DoubleFieldValue>
-