Class CoreOperationOr
java.lang.Object
org.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.CoreOperationOr
Implementation of
Expression for the operation "or".- Version:
- $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
-
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_PRECEDENCEFields inherited from class org.apache.commons.jxpath.ri.compiler.Expression
NOT_A_NUMBER, ONE, ZERO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeValue(EvalContext context) Evaluates the expression.protected intComputes the precedence of the operation.Returns the XPath symbol for this operation, e.g.protected booleanReturns 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, toStringMethods inherited from class org.apache.commons.jxpath.ri.compiler.Operation
computeContextDependent, getArgumentsMethods inherited from class org.apache.commons.jxpath.ri.compiler.Expression
isContextDependent, iterate, iteratePointers
-
Constructor Details
-
CoreOperationOr
Create a new CoreOperationOr.- Parameters:
args- or'd Expression components
-
-
Method Details
-
computeValue
Description copied from class:ExpressionEvaluates the expression. If the result is a node set, returns the first element of the node set.- Specified by:
computeValuein classCoreOperation- Parameters:
context- evaluation context- Returns:
- Object
-
getPrecedence
protected int getPrecedence()Description copied from class:CoreOperationComputes the precedence of the operation.- Specified by:
getPrecedencein classCoreOperation- Returns:
- int precedence
-
isSymmetric
protected boolean isSymmetric()Description copied from class:CoreOperationReturns true if the operation is not sensitive to the order of arguments, e.g. "=", "and" etc, and false if it is, e.g. "<=", "div".- Specified by:
isSymmetricin classCoreOperation- Returns:
- boolean
-
getSymbol
Description copied from class:CoreOperationReturns the XPath symbol for this operation, e.g. "+", "div", etc.- Specified by:
getSymbolin classCoreOperation- Returns:
- String symbol
-