Class Neg
java.lang.Object
org.loboevolution.apache.xpath.Expression
org.loboevolution.apache.xpath.operations.UnaryOperation
org.loboevolution.apache.xpath.operations.Neg
- All Implemented Interfaces:
SourceLocator
,ExpressionNode
,XPathVisitable
The unary '-' operation expression executer.
-
Field Summary
Fields inherited from class org.loboevolution.apache.xpath.operations.UnaryOperation
m_right
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
num
(XPathContext xctxt) Evaluate expression to a number.Apply the operation to two operands, and return the result.Methods inherited from class org.loboevolution.apache.xpath.operations.UnaryOperation
callVisitors, canTraverseOutsideSubtree, deepEquals, execute, setRight
Methods inherited from class org.loboevolution.apache.xpath.Expression
asIterator, asNode, assertion, bool, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber
-
Constructor Details
-
Neg
public Neg()
-
-
Method Details
-
operate
Apply the operation to two operands, and return the result.- Specified by:
operate
in classUnaryOperation
- Parameters:
right
- non-null reference to the evaluated right operand.- Returns:
- non-null reference to the XObject that represents the result of the operation.
- Throws:
TransformerException
- in case of error
-
num
Evaluate expression to a number.- Overrides:
num
in classExpression
- Parameters:
xctxt
- The XPath runtime context.- Returns:
- The expression evaluated as a double.
- Throws:
TransformerException
- if any
-