Arithmetic
Class PostfixEvaluator

java.lang.Object
  |
  +--Arithmetic.PostfixEvaluator

public class PostfixEvaluator
extends java.lang.Object

PostfixEvaluator evaluates the result of a postfix expression


Constructor Summary
PostfixEvaluator(StringReader r)
          Constructor PostfixEvaluator initializes the evaluator
 
Method Summary
 int evaluate()
          evaluate evaluates the postfix expression to an integer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostfixEvaluator

public PostfixEvaluator(StringReader r)
Constructor PostfixEvaluator initializes the evaluator
Parameters:
r - - the postfix expression to be evaluated
Method Detail

evaluate

public int evaluate()
evaluate evaluates the postfix expression to an integer
Returns:
the value of the expression supplied to the constructor method.