Package generic.expressions
Class LongExpressionValue
java.lang.Object
generic.expressions.LongExpressionValue
- All Implemented Interfaces:
ExpressionElement,ExpressionValue
Long operand values. See
ExpressionValue. Defines supported operators and other
operands for expression values that are long values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyBinaryOperator(ExpressionOperator operator, ExpressionValue operand) Method called to apply a binary operator to this value.applyUnaryOperator(ExpressionOperator operator) Method called to apply a unary operator to this value.longtoString()
-
Constructor Details
-
LongExpressionValue
public LongExpressionValue(long value)
-
-
Method Details
-
getLongValue
public long getLongValue() -
toString
-
applyUnaryOperator
Description copied from interface:ExpressionValueMethod called to apply a unary operator to this value.- Specified by:
applyUnaryOperatorin interfaceExpressionValue- 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
public ExpressionValue applyBinaryOperator(ExpressionOperator operator, ExpressionValue operand) throws ExpressionException Description copied from interface:ExpressionValueMethod called to apply a binary operator to this value.- Specified by:
applyBinaryOperatorin interfaceExpressionValue- Parameters:
operator- the binary operator being applied.operand- 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 other value is not applicable for this operand and operator
-