public abstract class CoreOperation extends Operation
Expression.PointerIterator, Expression.ValueIterator
Modifier and Type | Field and Description |
---|---|
protected static int |
ADD_PRECEDENCE
add/subtract precedence
|
protected static int |
AND_PRECEDENCE
and precedence
|
protected static int |
COMPARE_PRECEDENCE
compare precedence
|
protected static int |
MULTIPLY_PRECEDENCE
multiply/divide/mod precedence
|
protected static int |
NEGATE_PRECEDENCE
negate precedence
|
protected static int |
OR_PRECEDENCE
or precedence
|
protected static int |
RELATIONAL_EXPR_PRECEDENCE
relational expression precedence
|
protected static int |
UNION_PRECEDENCE
union precedence
|
NOT_A_NUMBER, ONE, ZERO
Constructor and Description |
---|
CoreOperation(Expression[] args)
Create a new CoreOperation.
|
Modifier and Type | Method and Description |
---|---|
Object |
compute(EvalContext context)
Evaluates the expression.
|
abstract Object |
computeValue(EvalContext context)
Evaluates the expression.
|
protected abstract int |
getPrecedence()
Computes the precedence of the operation.
|
abstract String |
getSymbol()
Returns the XPath symbol for this operation, e.g. "+", "div", etc.
|
protected abstract 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.
|
String |
toString() |
computeContextDependent, getArguments
isContextDependent, iterate, iteratePointers
protected static final int OR_PRECEDENCE
protected static final int AND_PRECEDENCE
protected static final int COMPARE_PRECEDENCE
protected static final int RELATIONAL_EXPR_PRECEDENCE
protected static final int ADD_PRECEDENCE
protected static final int MULTIPLY_PRECEDENCE
protected static final int NEGATE_PRECEDENCE
protected static final int UNION_PRECEDENCE
public CoreOperation(Expression[] args)
args
- Expression[]public Object compute(EvalContext context)
Expression
compute
in class Expression
context
- evaluation contextpublic abstract Object computeValue(EvalContext context)
Expression
computeValue
in class Expression
context
- evaluation contextpublic abstract String getSymbol()
protected abstract boolean isSymmetric()
protected abstract int getPrecedence()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.