Package io.atlasmap.expression.internal
Class ComparisonExpression
java.lang.Object
io.atlasmap.expression.internal.BinaryExpression
io.atlasmap.expression.internal.ComparisonExpression
- All Implemented Interfaces:
Expression
,BooleanExpression
A filter performing a comparison of two objects.
- Version:
- $Revision: 1.2 $
-
Field Summary
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 abstract boolean
asBoolean
(int answer) static void
Only Numeric expressions can be used in >, >=, < or <= expressions.protected Boolean
compare
(Comparable lv, Comparable rv) static BooleanExpression
createBetween
(Expression value, Expression left, Expression right) static BooleanExpression
createEqual
(Expression left, Expression right) static BooleanExpression
createGreaterThan
(Expression left, Expression right) static BooleanExpression
createGreaterThanEqual
(Expression left, Expression right) static BooleanExpression
createInFilter
(Expression left, List elements) static BooleanExpression
createIsNotNull
(Expression left) static BooleanExpression
createIsNull
(Expression left) static BooleanExpression
createLessThan
(Expression left, Expression right) static BooleanExpression
createLessThanEqual
(Expression left, Expression right) static BooleanExpression
createLike
(Expression left, String right, String escape) static BooleanExpression
createNotBetween
(Expression value, Expression left, Expression right) static BooleanExpression
createNotEqual
(Expression left, Expression right) static BooleanExpression
createNotInFilter
(Expression left, List elements) static BooleanExpression
createNotLike
(Expression left, String right, String escape) evaluate
(ExpressionContext expressionContext) Execute the expression against the given context.boolean
matches
(ExpressionContext message) Methods inherited from class io.atlasmap.expression.internal.BinaryExpression
equals, getExpressionSymbol, getLeft, getRight, hashCode, setLeft, setRight, toString
-
Field Details
-
CONVERT_STRING_EXPRESSIONS
-
-
Constructor Details
-
ComparisonExpression
- Parameters:
left
- leftExpression
right
- rightExpression
-
-
Method Details
-
createBetween
-
createNotBetween
public static BooleanExpression createNotBetween(Expression value, Expression left, Expression right) -
createLike
-
createNotLike
-
createInFilter
-
createNotInFilter
-
createIsNull
-
createIsNotNull
-
createNotEqual
-
createEqual
-
createGreaterThan
-
createGreaterThanEqual
-
createLessThan
-
createLessThanEqual
-
checkLessThanOperand
Only Numeric expressions can be used in >, >=, < or <= expressions.- Parameters:
expr
-Expression
-
evaluate
Description copied from interface:Expression
Execute the expression against the given context.- Specified by:
evaluate
in interfaceExpression
- Parameters:
expressionContext
-ExpressionContext
- Returns:
Field
represents a result- Throws:
ExpressionException
- If evaluation fails
-
compare
-
asBoolean
protected abstract boolean asBoolean(int answer) -
matches
- Specified by:
matches
in interfaceBooleanExpression
- Parameters:
message
- expression context- Returns:
- true if the expression evaluates to Boolean.TRUE.
- Throws:
ExpressionException
- exception
-