Package generic.expressions
Interface ExpressionValue
- All Superinterfaces:
ExpressionElement
- All Known Implementing Classes:
AddressExpressionValue
,LongExpressionValue
Operand types use by the
ExpressionEvaluator
must implement this interface.-
Method Summary
Modifier and TypeMethodDescriptionapplyBinaryOperator
(ExpressionOperator operator, ExpressionValue value) Method called to apply a binary operator to this value.applyUnaryOperator
(ExpressionOperator operator) Method called to apply a unary operator to this value.
-
Method Details
-
applyUnaryOperator
Method called to apply a unary operator to this value.- Parameters:
operator
- the operator being applied- Returns:
- the new value after the operator is applied to this value
- Throws:
ExpressionException
- if the operator is not applicable for this value
-
applyBinaryOperator
ExpressionValue applyBinaryOperator(ExpressionOperator operator, ExpressionValue value) throws ExpressionException Method called to apply a binary operator to this value.- Parameters:
operator
- the binary operator being applied.value
- the other value to combine with this value by the operator- Returns:
- the new value after the operator is applied to this value
- Throws:
ExpressionException
- if the operator is not applicable for this value or the the other value is not applicable for this operand and operator
-