public abstract class CoreOperationCompare extends CoreOperation
Expression.PointerIterator, Expression.ValueIterator
ADD_PRECEDENCE, AND_PRECEDENCE, COMPARE_PRECEDENCE, MULTIPLY_PRECEDENCE, NEGATE_PRECEDENCE, OR_PRECEDENCE, RELATIONAL_EXPR_PRECEDENCE, UNION_PRECEDENCE
NOT_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. "=", "and" etc, and false if it is, e.g.
|
compute, getSymbol, toString
computeContextDependent, getArguments
isContextDependent, iterate, iteratePointers
public 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)
Expression
computeValue
in class CoreOperation
context
- evaluation contextprotected int getPrecedence()
CoreOperation
getPrecedence
in class CoreOperation
protected boolean isSymmetric()
CoreOperation
isSymmetric
in class CoreOperation
protected 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.