org.springframework.expression.spel.ast

## Class Operator

- java.lang.Object
- - org.springframework.expression.spel.ast.SpelNodeImpl
  - - org.springframework.expression.spel.ast.Operator

- All Implemented Interfaces:
    SpelNode
  Direct Known Subclasses:
    OpAnd, OpDec, OpDivide, OpEQ, OperatorBetween, OperatorInstanceof, OperatorMatches, OperatorPower, OpGE, OpGT, OpInc, OpLE, OpLT, OpMinus, OpModulus, OpMultiply, OpNE, OpOr, OpPlus

      public abstract class Operator
      extends SpelNodeImpl

  Common supertype for operators that operate on either one or two operands. In the case of multiply or divide there would be two operands, but for unary plus or minus, there is only one.
  Since:
    3.0
  Author:
    Andy Clement

- - ### Field Summary

    - ### Fields inherited from class org.springframework.expression.spel.ast.SpelNodeImpl

      `children, pos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Operator(String payload, int pos, SpelNodeImpl... operands)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SpelNodeImpl` | `getLeftOperand()`
    `String` | `getOperatorName()`
    `SpelNodeImpl` | `getRightOperand()`
    `String` | `toStringAST()` String format for all operators is the same '(' [operand] [operator] [operand] ')'

    - ### Methods inherited from class org.springframework.expression.spel.ast.SpelNodeImpl

      `getChild, getChildCount, getEndPosition, getObjectClass, getPreviousChild, getStartPosition, getTypedValue, getValue, getValue, getValueInternal, getValueRef, isWritable, nextChildIs, setValue`

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

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

- - ### Constructor Detail

    - #### Operator

          public Operator(String payload,
                  int pos,
                  SpelNodeImpl... operands)

  - ### Method Detail

    - #### getLeftOperand

          public SpelNodeImpl getLeftOperand()

    - #### getRightOperand

          public SpelNodeImpl getRightOperand()

    - #### getOperatorName

          public final String getOperatorName()

    - #### toStringAST

          public String toStringAST()

      String format for all operators is the same '(' [operand] [operator] [operand] ')'
      Specified by:
        `toStringAST` in interface `SpelNode`
      Specified by:
        `toStringAST` in class `SpelNodeImpl`
      Returns:
        the string form of this AST node