|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.bcit.cst.comp2526.assign2b.solution.RPNCalculatorUtils
public final class RPNCalculatorUtils
Abstract the processing of the formula with an RPNCalculaotr.
| Method Summary | |
|---|---|
static int |
processFormula(RPNCalculator calc,
java.lang.String formula)
Process the speicified formula using the provided calculator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int processFormula(RPNCalculator calc,
java.lang.String formula)
throws StackOverflowException,
StackUnderflowException,
InvalidOperationTypeException,
java.lang.IllegalArgumentException
calc - the calculator to perform the formula with.formula - the formula to calculate.
StackOverflowException - if there are too many operands in the formula.
StackUnderflowException - if there are too few operands in the formula.
InvalidOperationTypeException - if there is an invalid operation type in the formula.
java.lang.IllegalArgumentException - if either of the arguments are null.Operation.getCode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||