Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.filter
Class ArithmeticExpression

    java.lang.Object
      org.codehaus.activemq.filter.BinaryExpression
          org.codehaus.activemq.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.1 $

Field Summary
`protected static int` | `DOUBLE`
`protected static int` | `INTEGER`
`protected static int` | `LONG`

Fields inherited from class org.codehaus.activemq.filter.BinaryExpression
`left, right`

Constructor Summary
`ArithmeticExpression(Expression left, Expression right)`

Method Summary
`protected Number` | `asNumber(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 Number` | `divide(Number left, Number right)`
`Object` | `evaluate(Message message)`
`protected abstract Object` | `evaluate(Object lvalue, Object rvalue)`
`protected Number` | `minus(Number left, Number right)`
`protected Number` | `mod(Number left, Number right)`
`protected Number` | `multiply(Number left, Number right)`
`protected Number` | `plus(Number left, Number right)`

Methods inherited from class org.codehaus.activemq.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 Number plus(Number left,
                          Number right)

### minus

    protected Number minus(Number left,
                           Number right)

### multiply

    protected Number multiply(Number left,
                              Number right)

### divide

    protected Number divide(Number left,
                            Number right)

### mod

    protected Number mod(Number left,
                         Number right)

### asNumber

    protected Number asNumber(Object value)

### evaluate

    public Object evaluate(Message message)
                    throws JMSException

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

### evaluate

    protected abstract Object evaluate(Object lvalue,
                                       Object rvalue)

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.