public void run(DoubleStack inStack) throws ParseException { if (null == inStack) { throw new ParseException("Stack argument null"); } double r = 0; while (!inStack.isEmpty()) r += inStack.pop(); inStack.push(r); }