org.jaxen.function
public class CountFunction extends Object implements Function
4.1 number count(node-set)
The count function returns the number of nodes in the argument node-set.
See Also: Section 4.1 of the XPath Specification
Constructor Summary | |
---|---|
CountFunction()
Create a new CountFunction object. |
Method Summary | |
---|---|
Object | call(Context context, List args) Returns the number of nodes in the specified node-set. |
static Double | evaluate(Object obj) Returns the number of nodes in the specified node-set. |
CountFunction
object.Returns the number of nodes in the specified node-set.
Parameters: context ignored args the function arguments
Returns: a Double
giving the integral number of items in the first argument
Throws: FunctionCallException if args does not have exactly one
item; or that item is not a List
Returns the number of nodes in the specified node-set.
Parameters: obj a List
of nodes
Returns: the integral number of items in the list
Throws: FunctionCallException if obj is not a List