org.nfunk.jep.function
Interface PostfixMathCommandI

All Known Subinterfaces:
BinaryOperatorI, NaryOperatorI, UnaryOperatorI
All Known Implementing Classes:
Ele, ExteriorProduct, MAdd, MDot, MIf, MList, MMultiply, MPower, MSubtract, MUMinus, PostfixMathCommand, VList

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

run

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

Throws:
ParseException

getNumberOfParameters

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


setCurNumberOfParameters

public 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.



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