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
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
Fields inherited from class io.atlasmap.expression.internal.BinaryExpression
left, right
Fields inherited from interface io.atlasmap.expression.Expression
CACHE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Number
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
evaluate
(ExpressionContext message) Execute the expression against the given context.protected abstract Field
Evaluate expression.protected Number
protected Number
protected Number
protected Number
Methods 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 leftExpression
right
- The rightExpression
-
-
Method Details
-
createPlus
-
createMinus
-
createMultiply
-
createDivide
-
createMod
-
plus
-
minus
-
multiply
-
divide
-
mod
-
asNumber
-
evaluate
Description copied from interface:Expression
Execute the expression against the given context.- Parameters:
message
-ExpressionContext
- Returns:
Field
represents a result- Throws:
ExpressionException
- If evaluation fails
-
evaluate
Evaluate expression.
-