Parameters, XPathExpressionpublic class SumFunctionCall extends FunctionCallImpl
INVALID_NUMBER_PARAMS, INVALID_RESULTEXPR, FUNCTION_CALL, LITERAL, NUMBER, VARIABLE_REFERENCEBOOLEAN, ERROR, FILTER_EXPR, LOCATION_PATH, NODE_TEST, PATH_EXPR, PRIMARY, STEP, STRING, UNION_EXPR| Constructor | Description |
|---|---|
SumFunctionCall() |
Creates a new SumFunctionCall
|
| Modifier and Type | Method | Description |
|---|---|---|
double |
computeSum(NodeSet nodeSet) |
Computes the sum of the given NodeSet.
|
XPathResult |
evaluate(XPathContext context) |
Evaluates the expression and returns the XPath result.
|
addParameter, getFunctionName, getParameter, getParameterCount, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExprType, getTypepublic XPathResult evaluate(XPathContext context) throws XPathException
context - The XPathContext to use during evaluation.XPathException - if an error occured while
evaluating this expression.public double computeSum(NodeSet nodeSet) throws XPathException
nodeSet - the NodeSet to the compute the sum ofXPathException - when a non-numeric value is
encountered.