public class StandardOperatorOverloader extends java.lang.Object implements OperatorOverloader
| Constructor and Description |
|---|
StandardOperatorOverloader() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
operate(Operation operation,
java.lang.Object leftOperand,
java.lang.Object rightOperand)
Execute the specified operation on two operands, returning a result.
|
boolean |
overridesOperation(Operation operation,
java.lang.Object leftOperand,
java.lang.Object rightOperand)
Return true if the operator overloader supports the specified operation
between the two operands and so should be invoked to handle it.
|
public boolean overridesOperation(Operation operation, java.lang.Object leftOperand, java.lang.Object rightOperand) throws EvaluationException
OperatorOverloaderoverridesOperation in interface OperatorOverloaderoperation - the operation to be performedleftOperand - the left operandrightOperand - the right operandEvaluationException - if there is a problem performing the operationpublic java.lang.Object operate(Operation operation, java.lang.Object leftOperand, java.lang.Object rightOperand) throws EvaluationException
OperatorOverloaderOperation for supported operations.operate in interface OperatorOverloaderoperation - the operation to be performedleftOperand - the left operandrightOperand - the right operandEvaluationException - if there is a problem performing the operation