Package org.jaxen.function
Class SumFunction
java.lang.Object
org.jaxen.function.SumFunction
- All Implemented Interfaces:
Function
4.4 number sum(node-set)
The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SumFunction
public SumFunction()Create a newSumFunction
object.
-
-
Method Details
-
call
Returns the sum of its arguments.- Specified by:
call
in interfaceFunction
- Parameters:
context
- the context at the point in the expression when the function is calledargs
- a list that contains exactly one item, also aList
- Returns:
- a
Double
containing the sum of the items inargs.get(0)
- Throws:
FunctionCallException
- ifargs
has more or less than one item; or if the first argument is not aList
-