org.jaxen.function
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. |
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 Function
context
- 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 List
public 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
Copyright © 2001-2013 Codehaus. All Rights Reserved.