|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--RPNEvaluatorSolution
IRPNEvaluator solution that uses a stack and a queue to process the tokens of the expression
Field Summary | |
protected IStack |
operands
Stack used to hold operands during evaluation. |
protected IQueue |
tokens
Queue used to hold parsed tokens. |
Constructor Summary | |
RPNEvaluatorSolution()
Creates a new RPN evaluator. |
Method Summary | |
int |
evaluate(String anExpression)
Returns the result of evaluating the given RPN expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected IQueue tokens
protected IStack operands
Constructor Detail |
public RPNEvaluatorSolution()
Method Detail |
public int evaluate(String anExpression)
evaluate
in interface IRPNEvaluator
anExpression
- expression to evaluate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |