public class StandardOperatorOverloader extends Object implements OperatorOverloader
| 构造器和说明 |
|---|
StandardOperatorOverloader() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
operate(Operation operation,
Object leftOperand,
Object rightOperand)
Execute the specified operation on two operands, returning a result.
|
boolean |
overridesOperation(Operation operation,
Object leftOperand,
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, @Nullable Object leftOperand, @Nullable Object rightOperand) throws EvaluationException
OperatorOverloaderoverridesOperation 在接口中 OperatorOverloaderoperation - the operation to be performedleftOperand - the left operandrightOperand - the right operandEvaluationException - if there is a problem performing the operationpublic Object operate(Operation operation, @Nullable Object leftOperand, @Nullable Object rightOperand) throws EvaluationException
OperatorOverloaderOperation for supported operations.operate 在接口中 OperatorOverloaderoperation - the operation to be performedleftOperand - the left operandrightOperand - the right operandEvaluationException - if there is a problem performing the operation