public abstract class AbstractCollectionExpressionEvaluator extends AbstractExpressionEvaluator
The following operators are supported:
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CONTAINS_ALL |
protected static String |
CONTAINS_ANY |
protected static String |
IS_EMPTY |
protected static String |
NOT_CONTAINS |
protected static String |
SIZE |
allowLeftNull, LEFT_OP_MISSING, LEFT_OP_NOT_SUPPORTED, OPERATOR_MISSING, OPERATOR_NOT_SUPPORTED, RIGHT_OP_MISSING, RIGHT_OP_NOT_ALLOWED, RIGHT_OP_NOT_SUPPORTED| Constructor and Description |
|---|
AbstractCollectionExpressionEvaluator() |
AbstractCollectionExpressionEvaluator(Map<String,Set<Class>> operatorMap) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
checkIfContainsAll(Object rightOperand,
Collection leftOperand)
Returns true if left operand Collection contains the right operand, or all of right operand elements if the right
operand is a collection.
|
protected abstract boolean |
checkIfContainsAny(Object rightOperand,
Collection leftOperand)
Returns true left operand Collection contains the right operand or any of right operand elements, if the right
operand is a collection.
|
protected boolean |
checkIfEmpty(Object rightOperand,
Collection operand) |
protected boolean |
checkIfNotContainsAny(Object rightOperand,
Collection operand)
Returns true if left operand Collection does not contain the right operand, or any of right operand elements if
the right operand is a collection.
|
protected boolean |
checkIfSize(Object rightOperand,
Collection operand) |
boolean |
evaluateTerm(Object leftOperand,
String operator,
Object rightOperand)
Evaluates this expression without any error or validation checking.
|
addSupportedOperator, addSupportedOperator, addSupportedOperator, evaluate, getLeftType, getSupportedOperators, getSupportedRightTypes, isSupported, isSupportedprotected static final String CONTAINS_ALL
protected static final String CONTAINS_ANY
protected static final String NOT_CONTAINS
protected static final String SIZE
protected static final String IS_EMPTY
public AbstractCollectionExpressionEvaluator()
public boolean evaluateTerm(Object leftOperand, String operator, Object rightOperand)
AbstractExpressionEvaluatorevaluateTerm in class AbstractExpressionEvaluatorleftOperand - value for left operandoperator - operator symbolrightOperand - value for right operandprotected boolean checkIfSize(Object rightOperand, Collection operand)
protected boolean checkIfEmpty(Object rightOperand, Collection operand)
protected abstract boolean checkIfContainsAny(Object rightOperand, Collection leftOperand)
protected abstract boolean checkIfContainsAll(Object rightOperand, Collection leftOperand)
protected boolean checkIfNotContainsAny(Object rightOperand, Collection operand)
Copyright © 2017 SAP SE. All Rights Reserved.