public class MatchExpression<T> extends Unary implements IMatchExpression<T>
IExpression that is expected
to return a boolean value. The wrapper provides the evaluation context needed
to evaluate the expression.Expression.VariableFinderTYPE_ALL, TYPE_AND, TYPE_ARRAY, TYPE_ASSIGNMENT, TYPE_AT, TYPE_COLLECT, TYPE_CONDITION, TYPE_EQUALS, TYPE_EXISTS, TYPE_FIRST, TYPE_FLATTEN, TYPE_FUNCTION, TYPE_GREATER, TYPE_GREATER_EQUAL, TYPE_INTERSECT, TYPE_LAMBDA, TYPE_LATEST, TYPE_LESS, TYPE_LESS_EQUAL, TYPE_LIMIT, TYPE_LITERAL, TYPE_MATCHES, TYPE_MEMBER, TYPE_NOT, TYPE_NOT_EQUALS, TYPE_OR, TYPE_PARAMETER, TYPE_PIPE, TYPE_SELECT, TYPE_TRAVERSE, TYPE_UNION, TYPE_UNIQUE, TYPE_VARIABLEKEYWORD_ALL, KEYWORD_BOOLEAN, KEYWORD_CLASS, KEYWORD_COLLECT, KEYWORD_EXISTS, KEYWORD_FALSE, KEYWORD_FILTER, KEYWORD_FIRST, KEYWORD_FLATTEN, KEYWORD_INTERSECT, KEYWORD_IQUERY, KEYWORD_LATEST, KEYWORD_LIMIT, KEYWORD_LOCALIZED_KEYS, KEYWORD_LOCALIZED_MAP, KEYWORD_LOCALIZED_PROPERTY, KEYWORD_NULL, KEYWORD_RANGE, KEYWORD_SATISFIES_ALL, KEYWORD_SATISFIES_ANY, KEYWORD_SELECT, KEYWORD_SET, KEYWORD_TRAVERSE, KEYWORD_TRUE, KEYWORD_UNION, KEYWORD_UNIQUE, KEYWORD_VERSION, OPERATOR_AND, OPERATOR_ARRAY, OPERATOR_ASSIGN, OPERATOR_AT, OPERATOR_EACH, OPERATOR_ELSE, OPERATOR_EQUALS, OPERATOR_GT, OPERATOR_GT_EQUAL, OPERATOR_IF, OPERATOR_LT, OPERATOR_LT_EQUAL, OPERATOR_MATCHES, OPERATOR_MEMBER, OPERATOR_NOT, OPERATOR_NOT_EQUALS, OPERATOR_OR, OPERATOR_PARAMETER, PRIORITY_AND, PRIORITY_ASSIGNMENT, PRIORITY_BINARY, PRIORITY_COLLECTION, PRIORITY_COMMA, PRIORITY_CONDITION, PRIORITY_FUNCTION, PRIORITY_LAMBDA, PRIORITY_LITERAL, PRIORITY_MAX, PRIORITY_MEMBER, PRIORITY_NOT, PRIORITY_OR, PRIORITY_VARIABLE, VARIABLE_EVERYTHING, VARIABLE_THIS| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(IExpressionVisitor visitor)
Let the visitor visit this instance and all expressions that this instance
contains.
|
IEvaluationContext |
createContext()
Creates a new context to be passed to repeated subsequent evaluations.
|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
evaluate(IEvaluationContext context)
Evaluate this expression with given context and variables.
|
int |
getExpressionType()
Returns the expression type (see TYPE_xxx constants).
|
java.lang.String |
getOperator() |
java.lang.Object[] |
getParameters()
Returns the parameters that this match expression was created with.
|
int |
getPriority() |
int |
hashCode() |
boolean |
isMatch(IEvaluationContext context,
T value)
This method assigns
candidate to the 'this' variable of the
context and then evaluates the expression. |
boolean |
isMatch(T value)
This method creates a new evaluation context and assigns the
candidate
to the 'this' variable of the context and then evaluates the expression. |
void |
toLDAPString(java.lang.StringBuffer bld)
Appends the an LDAP filter representation of this expression to the
collector. |
void |
toString(java.lang.StringBuffer bld,
Variable rootVariable) |
compareTo, getOperandappendOperand, assertLength, assertLength, compare, elementsToString, equals, evaluateAsIterator, getIndexCandidateMembers, hashCode, isReferenceTo, needsTranslationSupport, toLDAPString, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waittoStringpublic boolean accept(IExpressionVisitor visitor)
Expressionaccept in interface IExpressionaccept in class Unaryvisitor - The visiting visitor.true if the visitor should continue visiting,
false otherwise.public IEvaluationContext createContext()
IMatchExpressionCreates a new context to be passed to repeated subsequent evaluations. The context will introduce 'this' as an uninitialized variable and make the parameters available.
createContext in interface IMatchExpression<T>public java.lang.Object evaluate(IEvaluationContext context)
Expressionevaluate in interface IExpressionevaluate in class Unarycontext - The evaluation contextpublic int getExpressionType()
IExpressiongetExpressionType in interface IExpressionpublic java.lang.String getOperator()
getOperator in class Expressionpublic java.lang.Object[] getParameters()
IMatchExpressiongetParameters in interface IMatchExpression<T>null.public int getPriority()
getPriority in class Expressionpublic boolean isMatch(IEvaluationContext context, T value)
IMatchExpressioncandidate to the 'this' variable of the
context and then evaluates the expression.isMatch in interface IMatchExpression<T>context - A contextvalue - The object to test.public boolean isMatch(T value)
IMatchExpressioncandidate
to the 'this' variable of the context and then evaluates the expression.
This is essentially a short form for isMatch(createContext(), candidate).
isMatch in interface IMatchExpression<T>value - The object to test.public void toLDAPString(java.lang.StringBuffer bld)
IExpressioncollector.toLDAPString in interface IExpressiontoLDAPString in class Expression