com.jaxfront.core.jep
Class Sum

java.lang.Object
  extended by org.nfunk.jep.function.PostfixMathCommand
      extended by com.jaxfront.core.jep.JaxfrontMathCommand
          extended by com.jaxfront.core.jep.Sum
All Implemented Interfaces:
org.nfunk.jep.function.PostfixMathCommandI

public class Sum
extends JaxfrontMathCommand

The Sum function sum up all given parameters. It works only with Numbers! -1.

Version:
1.60

Constructor Summary
Sum()
          Constructor.
 
Method Summary
 void run(MathEvaluator.MathCommunicator communicator, java.util.Stack stack)
          Calculates the result of summing up all parameters, which are assumed to be of the Double type.
 
Methods inherited from class com.jaxfront.core.jep.JaxfrontMathCommand
run
 
Methods inherited from class org.nfunk.jep.function.PostfixMathCommand
getNumberOfParameters, getRootNode, run, setCurNumberOfParameters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sum

public Sum()
Constructor.

Method Detail

run

public void run(MathEvaluator.MathCommunicator communicator,
                java.util.Stack stack)
         throws org.nfunk.jep.ParseException
Calculates the result of summing up all parameters, which are assumed to be of the Double type.

Specified by:
run in class JaxfrontMathCommand
Throws:
org.nfunk.jep.ParseException