CoreOperationEqual
, CoreOperationNotEqual
public abstract class CoreOperationCompare extends CoreOperation
Expression.PointerIterator, Expression.ValueIterator
Modifier and Type | Field | Description |
---|---|---|
private boolean |
invert |
ADD_PRECEDENCE, AND_PRECEDENCE, COMPARE_PRECEDENCE, MULTIPLY_PRECEDENCE, NEGATE_PRECEDENCE, OR_PRECEDENCE, RELATIONAL_EXPR_PRECEDENCE, UNION_PRECEDENCE
NOT_A_NUMBER, ONE, ZERO
Modifier | Constructor | 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 | Description |
---|---|---|
java.lang.Object |
computeValue(EvalContext context) |
Evaluates the expression.
|
protected boolean |
contains(java.util.Iterator it,
java.lang.Object value) |
Learn whether it contains value.
|
protected boolean |
equal(java.lang.Object l,
java.lang.Object r) |
Learn whether l equals r in XPath terms.
|
protected boolean |
equal(EvalContext context,
Expression left,
Expression right) |
Compares two values.
|
protected boolean |
findMatch(java.util.Iterator lit,
java.util.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, toString
isContextDependent, iterate, iteratePointers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
computeContextDependent, getArguments
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 java.lang.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(java.util.Iterator it, java.lang.Object value)
it
- Iterator to checkvalue
- for which to lookprotected boolean findMatch(java.util.Iterator lit, java.util.Iterator rit)
lit
- left Iteratorrit
- right Iteratorprotected boolean equal(java.lang.Object l, java.lang.Object r)
l
- left operandr
- right operand