Package org.jaxen.function
Class CountFunction
java.lang.Object
org.jaxen.function.CountFunction
- All Implemented Interfaces:
Function
4.1 number count(node-set)
The count function returns the number of nodes in the argument node-set.
- Author:
- bob mcwhirter (bob @ werken.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CountFunction
public CountFunction()Create a newCountFunction
object.
-
-
Method Details
-
call
Returns the number of nodes in the specified node-set.
- Specified by:
call
in interfaceFunction
- Parameters:
context
- ignoredargs
- 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 aList
-
evaluate
Returns the number of nodes in the specified node-set.
- Parameters:
obj
- aList
of nodes- Returns:
- the integral number of items in the list
- Throws:
FunctionCallException
- if obj is not aList
-