public class CoreOperationNegate extends CoreOperation
Expression
for the operation unary "-".Expression.PointerIterator, Expression.ValueIterator
ADD_PRECEDENCE, AND_PRECEDENCE, COMPARE_PRECEDENCE, MULTIPLY_PRECEDENCE, NEGATE_PRECEDENCE, OR_PRECEDENCE, RELATIONAL_EXPR_PRECEDENCE, UNION_PRECEDENCE
NOT_A_NUMBER, ONE, ZERO
Constructor and Description |
---|
CoreOperationNegate(Expression arg)
Create a new CoreOperationNegate.
|
Modifier and Type | Method and Description |
---|---|
Object |
computeValue(EvalContext context)
Evaluates the expression.
|
protected int |
getPrecedence()
Computes the precedence of the operation.
|
String |
getSymbol()
Returns the XPath symbol for this operation, e.g. "+", "div", etc.
|
protected 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.
|
compute, toString
computeContextDependent, getArguments
isContextDependent, iterate, iteratePointers
public CoreOperationNegate(Expression arg)
arg
- the Expression to negatepublic 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
public String getSymbol()
CoreOperation
getSymbol
in class CoreOperation
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.