Package io.atlasmap.expression.internal
Class ArithmeticExpression
java.lang.Object
io.atlasmap.expression.internal.BinaryExpression
io.atlasmap.expression.internal.ArithmeticExpression
- All Implemented Interfaces:
Expression
An expression which performs an operation on two expression values.
- Version:
- $Revision: 1.2 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intFields inherited from class io.atlasmap.expression.internal.BinaryExpression
left, rightFields inherited from interface io.atlasmap.expression.Expression
CACHE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Numberstatic ExpressioncreateDivide(Expression left, Expression right) static ExpressioncreateMinus(Expression left, Expression right) static ExpressioncreateMod(Expression left, Expression right) static ExpressioncreateMultiply(Expression left, Expression right) static ExpressioncreatePlus(Expression left, Expression right) protected Numberevaluate(ExpressionContext message) Execute the expression against the given context.protected abstract FieldEvaluate expression.protected Numberprotected Numberprotected Numberprotected NumberMethods inherited from class io.atlasmap.expression.internal.BinaryExpression
equals, getExpressionSymbol, getLeft, getRight, hashCode, setLeft, setRight, toString
-
Field Details
-
INTEGER
protected static final int INTEGER- See Also:
-
LONG
protected static final int LONG- See Also:
-
DOUBLE
protected static final int DOUBLE- See Also:
-
-
Constructor Details
-
ArithmeticExpression
Constructor.- Parameters:
left- The leftExpressionright- The rightExpression
-
-
Method Details
-
createPlus
-
createMinus
-
createMultiply
-
createDivide
-
createMod
-
plus
-
minus
-
multiply
-
divide
-
mod
-
asNumber
-
evaluate
Description copied from interface:ExpressionExecute the expression against the given context.- Parameters:
message-ExpressionContext- Returns:
Fieldrepresents a result- Throws:
ExpressionException- If evaluation fails
-
evaluate
Evaluate expression.
-