Package org.apache.activemq.artemis.selector.filter

## Class ArithmeticExpression

- java.lang.Object
- - org.apache.activemq.artemis.selector.filter.BinaryExpression
  - - org.apache.activemq.artemis.selector.filter.ArithmeticExpression

- All Implemented Interfaces:
    `Expression`

      public abstract class ArithmeticExpression
      extends BinaryExpression

  An expression which performs an operation on two expression values
  Version:
    $Revision: 1.2 $

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static int` | `DOUBLE` |
    `protected static int` | `INTEGER` |
    `protected static int` | `LONG` |

    - ### Fields inherited from class org.apache.activemq.artemis.selector.filter.BinaryExpression

      `left, right`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ArithmeticExpression​(Expression left, Expression right)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected java.lang.Number` | `asNumber​(java.lang.Object value)` |
    `static Expression` | `createDivide​(Expression left, Expression right)` |
    `static Expression` | `createMinus​(Expression left, Expression right)` |
    `static Expression` | `createMod​(Expression left, Expression right)` |
    `static Expression` | `createMultiply​(Expression left, Expression right)` |
    `static Expression` | `createPlus​(Expression left, Expression right)` |
    `protected java.lang.Number` | `divide​(java.lang.Number left, java.lang.Number right)` |
    `protected abstract java.lang.Object` | `evaluate​(java.lang.Object lvalue, java.lang.Object rvalue)` |
    `java.lang.Object` | `evaluate​(Filterable message)` |
    `protected java.lang.Number` | `minus​(java.lang.Number left, java.lang.Number right)` |
    `protected java.lang.Number` | `mod​(java.lang.Number left, java.lang.Number right)` |
    `protected java.lang.Number` | `multiply​(java.lang.Number left, java.lang.Number right)` |
    `protected java.lang.Number` | `plus​(java.lang.Number left, java.lang.Number right)` |

    - ### Methods inherited from class org.apache.activemq.artemis.selector.filter.BinaryExpression

      `equals, getExpressionSymbol, getLeft, getRight, hashCode, setLeft, setRight, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### INTEGER

          protected static final int INTEGER

      See Also:
        Constant Field Values

    - #### LONG

          protected static final int LONG

      See Also:
        Constant Field Values

    - #### DOUBLE

          protected static final int DOUBLE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ArithmeticExpression

          public ArithmeticExpression​(Expression left,
                                      Expression right)

      Parameters:
        `left` -
        `right` -

  - ### Method Detail

    - #### createPlus

          public static Expression createPlus​(Expression left,
                                              Expression right)

    - #### createMinus

          public static Expression createMinus​(Expression left,
                                               Expression right)

    - #### createMultiply

          public static Expression createMultiply​(Expression left,
                                                  Expression right)

    - #### createDivide

          public static Expression createDivide​(Expression left,
                                                Expression right)

    - #### createMod

          public static Expression createMod​(Expression left,
                                             Expression right)

    - #### plus

          protected java.lang.Number plus​(java.lang.Number left,
                                          java.lang.Number right)

    - #### minus

          protected java.lang.Number minus​(java.lang.Number left,
                                           java.lang.Number right)

    - #### multiply

          protected java.lang.Number multiply​(java.lang.Number left,
                                              java.lang.Number right)

    - #### divide

          protected java.lang.Number divide​(java.lang.Number left,
                                            java.lang.Number right)

    - #### mod

          protected java.lang.Number mod​(java.lang.Number left,
                                         java.lang.Number right)

    - #### asNumber

          protected java.lang.Number asNumber​(java.lang.Object value)

    - #### evaluate

          public java.lang.Object evaluate​(Filterable message)
                                    throws FilterException

      Returns:
        the value of this expression
      Throws:
        `FilterException`

    - #### evaluate

          protected abstract java.lang.Object evaluate​(java.lang.Object lvalue,
                                                       java.lang.Object rvalue)

      Parameters:
        `lvalue` -
        `rvalue` -
      Returns: