public abstract class ArithmeticExpression extends BinaryExpression
Modifier and Type | Field and Description |
---|---|
protected static int |
DOUBLE |
protected static int |
INTEGER |
protected static int |
LONG |
left, right
cache
Constructor and Description |
---|
ArithmeticExpression(Expression left,
Expression right) |
Modifier and Type | Method and Description |
---|---|
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(ExpressionContext message)
Execute the expression against the given context.
|
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) |
equals, getExpressionSymbol, getLeft, getRight, hashCode, setLeft, setRight, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clearCache, parse
protected static final int INTEGER
protected static final int LONG
protected static final int DOUBLE
public ArithmeticExpression(Expression left, Expression right)
left
- right
- public static Expression createPlus(Expression left, Expression right)
public static Expression createMinus(Expression left, Expression right)
public static Expression createMultiply(Expression left, Expression right)
public static Expression createDivide(Expression left, Expression right)
public static Expression createMod(Expression left, Expression right)
public Object evaluate(ExpressionContext message) throws ExpressionException
Expression
ExpressionException
Copyright © 2019 JBoss by Red Hat. All rights reserved.