public abstract class CoreOperationCompare extends CoreOperation
Expression.PointerIterator, Expression.ValueIteratorADD_PRECEDENCE, AND_PRECEDENCE, COMPARE_PRECEDENCE, MULTIPLY_PRECEDENCE, NEGATE_PRECEDENCE, OR_PRECEDENCE, RELATIONAL_EXPR_PRECEDENCE, UNION_PRECEDENCENOT_A_NUMBER, ONE, ZERO| Modifier | Constructor and Description |
|---|---|
|
CoreOperationCompare(Expression arg1,
Expression arg2)
Create a new CoreOperationCompare.
|
protected |
CoreOperationCompare(Expression arg1,
Expression arg2,
boolean invert)
Create a new CoreOperationCompare.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
computeValue(EvalContext context)
Evaluates the expression.
|
protected boolean |
contains(Iterator it,
Object value)
Learn whether it contains value.
|
protected boolean |
equal(EvalContext context,
Expression left,
Expression right)
Compares two values.
|
protected boolean |
equal(Object l,
Object r)
Learn whether l equals r in XPath terms.
|
protected boolean |
findMatch(Iterator lit,
Iterator rit)
Learn whether lit intersects rit.
|
protected int |
getPrecedence()
Computes the precedence of the operation.
|
protected boolean |
isSymmetric()
Returns true if the operation is not sensitive to the order of arguments,
e.g.
|
compute, getSymbol, toStringcomputeContextDependent, getArgumentsisContextDependent, iterate, iteratePointerspublic CoreOperationCompare(Expression arg1, Expression arg2)
arg1 - left operandarg2 - right operandprotected CoreOperationCompare(Expression arg1, Expression arg2, boolean invert)
arg1 - left operandarg2 - right operandinvert - whether to invert (not) the comparisonpublic Object computeValue(EvalContext context)
ExpressioncomputeValue in class CoreOperationcontext - evaluation contextprotected int getPrecedence()
CoreOperationgetPrecedence in class CoreOperationprotected boolean isSymmetric()
CoreOperationisSymmetric in class CoreOperationprotected boolean equal(EvalContext context, Expression left, Expression right)
context - evaluation contextleft - operandright - operandprotected boolean contains(Iterator it, Object value)
it - Iterator to checkvalue - for which to lookprotected boolean findMatch(Iterator lit, Iterator rit)
lit - left Iteratorrit - right IteratorCopyright © 2001-2015 The Apache Software Foundation. All Rights Reserved.