public class CountFunction extends java.lang.Object implements Function
4.1 number count(node-set)
The count function returns the number of nodes in the argument node-set.
| Constructor and Description |
|---|
CountFunction()
Create a new
CountFunction object. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
call(Context context,
java.util.List args)
Returns the number of nodes in the specified node-set.
|
static java.lang.Double |
evaluate(java.lang.Object obj)
Returns the number of nodes in the specified node-set.
|
public java.lang.Object call(Context context, java.util.List args) throws FunctionCallException
Returns the number of nodes in the specified node-set.
call in interface Functioncontext - ignoredargs - the function argumentsDouble giving the integral number of items in the first argumentFunctionCallException - if args does not have exactly one
item; or that item is not a Listpublic static java.lang.Double evaluate(java.lang.Object obj)
throws FunctionCallException
Returns the number of nodes in the specified node-set.
obj - a List of nodesFunctionCallException - if obj is not a List