Package org.apache.qpid.server.filter
Class ArithmeticExpression<T>
- java.lang.Object
-
- org.apache.qpid.server.filter.BinaryExpression<T>
-
- org.apache.qpid.server.filter.ArithmeticExpression<T>
-
- All Implemented Interfaces:
Expression<T>
public abstract class ArithmeticExpression<T> extends BinaryExpression<T>
An expression which performs an operation on two expression values
-
-
Constructor Summary
Constructors Constructor Description ArithmeticExpression(Expression<T> left, Expression<T> right)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Number
asNumber(Object value)
static <E> Expression<E>
createDivide(Expression<E> left, Expression<E> right)
static <E> Expression<E>
createMinus(Expression<E> left, Expression<E> right)
static <E> Expression<E>
createMod(Expression<E> left, Expression<E> right)
static <E> Expression<E>
createMultiply(Expression<E> left, Expression<E> right)
static <E> Expression<E>
createPlus(Expression<E> left, Expression<E> right)
protected Number
divide(Number left, Number right)
protected abstract Object
evaluate(Object lvalue, Object rvalue)
Object
evaluate(T message)
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.apache.qpid.server.filter.BinaryExpression
equals, getExpressionSymbol, getLeft, getRight, hashCode, toString
-
-
-
-
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<T> left, Expression<T> right)
-
-
Method Detail
-
createPlus
public static <E> Expression<E> createPlus(Expression<E> left, Expression<E> right)
-
createMinus
public static <E> Expression<E> createMinus(Expression<E> left, Expression<E> right)
-
createMultiply
public static <E> Expression<E> createMultiply(Expression<E> left, Expression<E> right)
-
createDivide
public static <E> Expression<E> createDivide(Expression<E> left, Expression<E> right)
-
createMod
public static <E> Expression<E> createMod(Expression<E> left, Expression<E> right)
-
evaluate
public Object evaluate(T message)
- Parameters:
message
- object to evaluate- Returns:
- the value of this expression
-
-