Package org.springframework.expression.spel.support

# Class StandardOperatorOverloader

java.lang.Object
org.springframework.expression.spel.support.StandardOperatorOverloader

All Implemented Interfaces:
  `OperatorOverloader`

public class StandardOperatorOverloader extends Object implements OperatorOverloader
Standard implementation of `OperatorOverloader`.

Since:
  3.0
Author:
  Juergen Hoeller

## Constructor Summary

Constructors
Constructor
Description
`StandardOperatorOverloader()`

## Method Summary

Modifier and Type
Method
Description
`Object`
`operate(Operation operation, Object leftOperand, Object rightOperand)`
Perform the specified operation on the two operands, returning a result.
`boolean`
`overridesOperation(Operation operation, Object leftOperand, Object rightOperand)`
Return `true` if this operator overloader supports the specified operation on the two operands and should be invoked to handle it.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StandardOperatorOverloader

public StandardOperatorOverloader()

## Method Details

### overridesOperation

public boolean overridesOperation(Operation operation, @Nullable Object leftOperand, @Nullable Object rightOperand) throws EvaluationException
Description copied from interface: `OperatorOverloader`
Return `true` if this operator overloader supports the specified operation on the two operands and should be invoked to handle it.

Specified by:
  `overridesOperation` in interface `OperatorOverloader`
Parameters:
  `operation` - the operation to be performed
  `leftOperand` - the left operand
  `rightOperand` - the right operand
Returns:
  true if this `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, @Nullable Object leftOperand, @Nullable Object rightOperand) throws EvaluationException
Description copied from interface: `OperatorOverloader`
Perform the specified operation on the two operands, returning a result.

See `Operation` for supported operations.

Specified by:
  `operate` in interface `OperatorOverloader`
Parameters:
  `operation` - the operation to be performed
  `leftOperand` - the left operand
  `rightOperand` - the right operand
Returns:
  the result of performing the operation on the two operands
Throws:
  `EvaluationException` - if there is a problem performing the operation