|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jxpath.ri.compiler.Expression
org.apache.commons.jxpath.ri.compiler.Operation
org.apache.commons.jxpath.ri.compiler.CoreOperation
org.apache.commons.jxpath.ri.compiler.CoreOperationCompare
public abstract class CoreOperationCompare
Common superclass for the implementations of Expression for the operations "=" and "!=".
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
|---|
Expression.PointerIterator, Expression.ValueIterator |
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.jxpath.ri.compiler.CoreOperation |
|---|
ADD_PRECEDENCE, AND_PRECEDENCE, COMPARE_PRECEDENCE, MULTIPLY_PRECEDENCE, NEGATE_PRECEDENCE, OR_PRECEDENCE, RELATIONAL_EXPR_PRECEDENCE, UNION_PRECEDENCE |
| Fields inherited from class org.apache.commons.jxpath.ri.compiler.Operation |
|---|
args |
| Fields inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
|---|
NOT_A_NUMBER, ONE, ZERO |
| Constructor Summary | |
|---|---|
|
CoreOperationCompare(Expression arg1,
Expression arg2)
Create a new CoreOperationCompare. |
protected |
CoreOperationCompare(Expression arg1,
Expression arg2,
boolean invert)
Create a new CoreOperationCompare. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.commons.jxpath.ri.compiler.CoreOperation |
|---|
compute, getSymbol, toString |
| Methods inherited from class org.apache.commons.jxpath.ri.compiler.Operation |
|---|
computeContextDependent, getArguments |
| Methods inherited from class org.apache.commons.jxpath.ri.compiler.Expression |
|---|
isContextDependent, iterate, iteratePointers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CoreOperationCompare(Expression arg1,
Expression arg2)
arg1 - left operandarg2 - right operand
protected CoreOperationCompare(Expression arg1,
Expression arg2,
boolean invert)
arg1 - left operandarg2 - right operandinvert - whether to invert (not) the comparison| Method Detail |
|---|
public Object computeValue(EvalContext context)
Expression
computeValue in class CoreOperationcontext - evaluation context
protected int getPrecedence()
CoreOperation
getPrecedence in class CoreOperationprotected boolean isSymmetric()
CoreOperation
isSymmetric in class CoreOperation
protected boolean equal(EvalContext context,
Expression left,
Expression right)
context - evaluation contextleft - operandright - operand
protected boolean contains(Iterator it,
Object value)
it - Iterator to checkvalue - for which to look
protected boolean findMatch(Iterator lit,
Iterator rit)
lit - left Iteratorrit - right Iterator
protected boolean equal(Object l,
Object r)
l - left operandr - right operand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||