1 9 package org.nfunk.jep.function; 10 import java.util.*; 11 import org.nfunk.jep.*; 12 13 22 public class PostfixMathCommand implements PostfixMathCommandI 23 { 24 28 protected int numberOfParameters; 29 30 35 protected int curNumberOfParameters; 36 37 40 public PostfixMathCommand() { 41 numberOfParameters = 0; 42 curNumberOfParameters = 0; 43 } 44 45 48 protected void checkStack(Stack inStack) throws ParseException { 49 50 if (null == inStack) { 51 throw new ParseException("Stack argument null"); 52 } 53 } 54 55 58 public int getNumberOfParameters() { 59 return numberOfParameters; 60 } 61 62 67 public void setCurNumberOfParameters(int n) { 68 curNumberOfParameters = n; 69 } 70 71 77 public void run(Stack s) throws ParseException { 78 throw new ParseException("run() method of PostfixMathCommand called"); 79 } 80 } 81 | Popular Tags |