Class InfixMinusOperator
- java.lang.Object
-
- com.ezylang.evalex.operators.AbstractOperator
-
- com.ezylang.evalex.operators.arithmetic.InfixMinusOperator
-
- All Implemented Interfaces:
OperatorIfc
@InfixOperator(precedence=20) public class InfixMinusOperator extends AbstractOperator
Subtraction of two numbers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ezylang.evalex.operators.OperatorIfc
OperatorIfc.OperatorType
-
-
Field Summary
-
Fields inherited from interface com.ezylang.evalex.operators.OperatorIfc
OPERATOR_PRECEDENCE_ADDITIVE, OPERATOR_PRECEDENCE_AND, OPERATOR_PRECEDENCE_COMPARISON, OPERATOR_PRECEDENCE_EQUALITY, OPERATOR_PRECEDENCE_MULTIPLICATIVE, OPERATOR_PRECEDENCE_OR, OPERATOR_PRECEDENCE_POWER, OPERATOR_PRECEDENCE_POWER_HIGHER, OPERATOR_PRECEDENCE_UNARY
-
-
Constructor Summary
Constructors Constructor Description InfixMinusOperator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationValueevaluate(Expression expression, Token operatorToken, EvaluationValue... operands)Performs the operator logic and returns an evaluation result.-
Methods inherited from class com.ezylang.evalex.operators.AbstractOperator
getPrecedence, isInfix, isLeftAssociative, isOperandLazy, isPostfix, isPrefix
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ezylang.evalex.operators.OperatorIfc
getPrecedence
-
-
-
-
Method Detail
-
evaluate
public EvaluationValue evaluate(Expression expression, Token operatorToken, EvaluationValue... operands) throws EvaluationException
Description copied from interface:OperatorIfcPerforms the operator logic and returns an evaluation result.- Parameters:
expression- The expression, where this function is executed. Can be used to access the expression configuration.operatorToken- The operator token from the parsed expression.operands- The operands, one for prefix and postfix operators, two for infix operators.- Returns:
- The evaluation result in form of a
EvaluationValue. - Throws:
EvaluationException- In case there were problems during evaluation.
-
-