org.jscience.ml.sbml.jep.function
Interface PostfixMathCommandI

All Known Implementing Classes:
PostfixMathCommand

public interface PostfixMathCommandI

All function classes must implement this interface to ensure that the run() method is implemented.


Method Summary
 int getNumberOfParameters()
          Returns the number of required parameters, or -1 if any number of parameters is allowed.
 void run(java.util.Stack aStack)
          Run the function on the stack.
 void setCurNumberOfParameters(int n)
          Sets the number of current number of parameters used in the next call of run().
 

Method Detail

getNumberOfParameters

int getNumberOfParameters()
Returns the number of required parameters, or -1 if any number of parameters is allowed.

Returns:
DOCUMENT ME!

run

void run(java.util.Stack aStack)
         throws java.lang.Exception
Run the function on the stack. Pops the arguments from the stack, and pushes the result on the top of the stack.

Parameters:
aStack - DOCUMENT ME!
Throws:
java.lang.Exception - DOCUMENT ME!

setCurNumberOfParameters

void setCurNumberOfParameters(int n)
Sets the number of current number of parameters used in the next call of run(). This method is only called when the reqNumberOfParameters is -1.

Parameters:
n - DOCUMENT ME!