|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OperatorOverloader
By default the mathematical operators Operation
support simple types like numbers. By providing an
implementation of OperatorOverloader, a user of the expression language can support these operations on other types.
Method Summary | |
---|---|
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. |
Method Detail |
---|
boolean overridesOperation(Operation operation, java.lang.Object leftOperand, java.lang.Object rightOperand) throws EvaluationException
operation
- the operation to be performedleftOperand
- the left operandrightOperand
- the right operand
EvaluationException
- if there is a problem performing the operationjava.lang.Object operate(Operation operation, java.lang.Object leftOperand, java.lang.Object rightOperand) throws EvaluationException
Operation
for supported operations.
operation
- the operation to be performedleftOperand
- the left operandrightOperand
- the right operand
EvaluationException
- if there is a problem performing the operation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |