com.japisoft.xpath.function.basic
Class Sum

java.lang.Object
  |
  +--com.japisoft.xpath.function.AbstractFunction
        |
        +--com.japisoft.xpath.function.basic.Sum
All Implemented Interfaces:
Function

public final class Sum
extends AbstractFunction

function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number

Author:
(c) 2003 JAPISOFT

Constructor Summary
Sum()
           
 
Method Summary
 java.lang.Object eval(XPathContext context, FastVector arg)
          Evalute this function for this context and the following arguments
 
Methods inherited from class com.japisoft.xpath.function.AbstractFunction
checkOneNodeSet, checkOneNumber, checkOneParameter, checkOneString, checkThreeStrings, checkTwoStrings, getString1, getString2, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sum

public Sum()
Method Detail

eval

public java.lang.Object eval(XPathContext context,
                             FastVector arg)
Description copied from class: AbstractFunction
Evalute this function for this context and the following arguments

Specified by:
eval in interface Function
Specified by:
eval in class AbstractFunction
Parameters:
arg - a Vector value, this is the responsability of the function to test the argument type
Returns:
an Object value like Integer, Boolean, String or NodeSet