Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.singularsys.jep.functions
Class Sum

    java.lang.Object
      com.singularsys.jep.functions.PostfixMathCommand
          com.singularsys.jep.functions.Sum

All Implemented Interfaces:
  PostfixMathCommandI

    public class Sum

extends PostfixMathCommand

This class serves mainly as an example of a function that accepts any number of parameters. Note that the numberOfParameters is initialized to -1.

Field Summary

Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
`curNumberOfParameters, numberOfParameters`

Constructor Summary
`Sum()` Constructor.

Method Summary
`void` | `run(java.util.Stack<java.lang.Object> stack)` Calculates the result of summing up all parameters, which are assumed to be of the Double type.

Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
`checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameters`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Sum

    public Sum()

  Constructor.

Method Detail

### run

    public void run(java.util.Stack<java.lang.Object> stack)
             throws EvaluationException

  Calculates the result of summing up all parameters, which are assumed to be of the Double type.

  Throws:
    `EvaluationException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Singular Systems http://www.singularsys.com/jep