Class CountFunction

    • Constructor Summary

      Constructors 
      Constructor Description
      CountFunction()
      Create a new CountFunction object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CountFunction

        public CountFunction()
        Create a new CountFunction object.
    • Method Detail

      • call

        public java.lang.Object call​(Context context,
                                     java.util.List args)
                              throws FunctionCallException

        Returns the number of nodes in the specified node-set.

        Specified by:
        call in interface Function
        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
      • evaluate

        public static java.lang.Double evaluate​(java.lang.Object obj)
                                         throws FunctionCallException

        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