Class StandardOperatorOverloader
- java.lang.Object
- org.springframework.expression.spel.support.StandardOperatorOverloader
- All Implemented Interfaces:
OperatorOverloader
public class StandardOperatorOverloader extends Object implements OperatorOverloader
- Since:
- 3.0
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description StandardOperatorOverloader()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
Constructor Detail
StandardOperatorOverloader
public StandardOperatorOverloader()
Method Detail
overridesOperation
public boolean overridesOperation(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException
Description copied from interface:OperatorOverloader
Return true if the operator overloader supports the specified operation between the two operands and so should be invoked to handle it.- Specified by:
overridesOperation
in interfaceOperatorOverloader
- Parameters:
operation
- the operation to be performedleftOperand
- the left operandrightOperand
- the right operand- Returns:
- true if the OperatorOverloader supports the specified operation between the two operands
- Throws:
EvaluationException
- if there is a problem performing the operation
operate
public Object operate(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException
Description copied from interface:OperatorOverloader
Execute the specified operation on two operands, returning a result. SeeOperation
for supported operations.- Specified by:
operate
in interfaceOperatorOverloader
- Parameters:
operation
- the operation to be performedleftOperand
- the left operandrightOperand
- the right operand- Returns:
- the result of performing the operation on the two operands
- Throws:
EvaluationException
- if there is a problem performing the operation