|
||||||||||
| 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.CoreOperationRelationalExpression
public abstract class CoreOperationRelationalExpression
Base implementation of Expression for the operations ">", ">=", "<", "<=".
| 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 | |
|---|---|
protected |
CoreOperationRelationalExpression(Expression[] args)
Create a new CoreOperationRelationalExpression. |
| Method Summary | |
|---|---|
private boolean |
compute(java.lang.Object left,
java.lang.Object right)
Compare left to right. |
java.lang.Object |
computeValue(EvalContext context)
Evaluates the expression. |
private boolean |
containsMatch(java.util.Iterator it,
java.lang.Object value)
Learn whether any element returned from an Iterator matches a given value. |
protected abstract boolean |
evaluateCompare(int compare)
Template method for subclasses to evaluate the result of a comparison. |
private boolean |
findMatch(java.util.Iterator lit,
java.util.Iterator rit)
Learn whether there is an intersection between two Iterators. |
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. |
private java.lang.Object |
reduce(java.lang.Object o)
Reduce an operand for comparison. |
| 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 |
|---|
protected CoreOperationRelationalExpression(Expression[] args)
args - arguments| Method Detail |
|---|
public final java.lang.Object computeValue(EvalContext context)
Expression
computeValue in class CoreOperationcontext - evaluation context
protected final int getPrecedence()
CoreOperation
getPrecedence in class CoreOperationprotected final boolean isSymmetric()
CoreOperation
isSymmetric in class CoreOperationprotected abstract boolean evaluateCompare(int compare)
compare - result of comparison to evaluate
private boolean compute(java.lang.Object left,
java.lang.Object right)
left - left operandright - right operand
private java.lang.Object reduce(java.lang.Object o)
o - Object to reduce
private boolean containsMatch(java.util.Iterator it,
java.lang.Object value)
it - Iteratorvalue - to look for
private boolean findMatch(java.util.Iterator lit,
java.util.Iterator rit)
lit - left Iteratorrit - right Iterator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||