|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nfunk.jep.function.PostfixMathCommand
org.nfunk.jep.function.Sum
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 org.nfunk.jep.function.PostfixMathCommand |
curNumberOfParameters, numberOfParameters |
| Constructor Summary | |
Sum()
Constructor. |
|
| Method Summary | |
void |
run(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 org.nfunk.jep.function.PostfixMathCommand |
checkStack, getNumberOfParameters, setCurNumberOfParameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Sum()
| Method Detail |
public void run(java.util.Stack stack)
throws ParseException
run in interface PostfixMathCommandIrun in class PostfixMathCommandParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||