Class NullWrapTest.MyPfmc

java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jeptests.system.NullWrapTest.MyPfmc
All Implemented Interfaces:
PostfixMathCommandI, Serializable
Enclosing class:
NullWrapTest

public static class NullWrapTest.MyPfmc extends PostfixMathCommand
A simple multi arg function.
See Also:
  • Constructor Details

    • MyPfmc

      public MyPfmc()
  • Method Details

    • checkNumberOfParameters

      public boolean checkNumberOfParameters(int n)
      Description copied from class: PostfixMathCommand
      Checks the number of parameters of the function. Functions which set numberOfParameter=-1 should overload this method
      Specified by:
      checkNumberOfParameters in interface PostfixMathCommandI
      Overrides:
      checkNumberOfParameters in class PostfixMathCommand
      Parameters:
      n - number of parameters function will be called with.
      Returns:
      false if an illegal number of parameters is supplied, true otherwise.
    • run

      public void run(Stack<Object> s) throws EvaluationException
      Description copied from class: PostfixMathCommand
      Throws an exception because this method should never be called under normal circumstances. Each function should use its own run() method for evaluating the function. This includes popping off the parameters from the stack, and pushing the result back on the stack.
      Specified by:
      run in interface PostfixMathCommandI
      Overrides:
      run in class PostfixMathCommand
      Parameters:
      s - arguments for function
      Throws:
      EvaluationException - if function cannot be evaluated