SmartFrog 3.10.000

org.smartfrog.sfcore.languages.sf.functions
Class Sum

java.lang.Object
  extended by org.smartfrog.sfcore.languages.sf.functions.BaseFunction
      extended by org.smartfrog.sfcore.languages.sf.functions.BaseOperator
          extended by org.smartfrog.sfcore.languages.sf.functions.Sum
All Implemented Interfaces:
Function

public class Sum
extends BaseOperator

Defines the Sum function that sums each of its attributes with the same semantics as Java for its primitive types, failure will result in an exception.


Field Summary
 
Fields inherited from class org.smartfrog.sfcore.languages.sf.functions.BaseFunction
context, name
 
Constructor Summary
Sum()
           
 
Method Summary
protected  java.lang.Object doOperator(java.lang.Object a, java.lang.Object b)
          Sums two numbers.
 
Methods inherited from class org.smartfrog.sfcore.languages.sf.functions.BaseOperator
doFunction
 
Methods inherited from class org.smartfrog.sfcore.languages.sf.functions.BaseFunction
doit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sum

public Sum()
Method Detail

doOperator

protected java.lang.Object doOperator(java.lang.Object a,
                                      java.lang.Object b)
                               throws SmartFrogCompileResolutionException
Sums two numbers.

Specified by:
doOperator in class BaseOperator
Parameters:
a - first number
b - second number
Returns:
sum
Throws:
SmartFrogCompileResolutionException - if one of the parameters is not a Number

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP