Class CollectionPostfixEvaluator

  extended byinfix2postfix.PostfixEvaluator
      extended byinfix2postfix.CollectionPostfixEvaluator

public class CollectionPostfixEvaluator
extends PostfixEvaluator

This object can evaluate any postfix expression having custom objects as operands and operators. Here the postfix expression should be as a java.util.Collection object where each item in the collection either represents an operand or an operator.

Maulin H. Vasavada

Field Summary
Fields inherited from class infix2postfix.PostfixEvaluator
inputStack, OPERAND, operandManager, OPERATOR, operators, outputStack
Constructor Summary
CollectionPostfixEvaluator(OperandManager operandManager)
Method Summary
protected  void populateInputStack(java.lang.Object postfixExpression)
          Populates the input stack needed for postfix evaluation.
Methods inherited from class infix2postfix.PostfixEvaluator
addOperator, checkAndPopulateInputStack, evaluate, evaluate, evaluate, getOperators, removeOperator, setOperandManager, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CollectionPostfixEvaluator(OperandManager operandManager)

Method Detail


protected void populateInputStack(java.lang.Object postfixExpression)
                           throws InvalidExpressionFormatException
Populates the input stack needed for postfix evaluation. The input postfixExpression must be in java.util.Collection format. More precisely postfixExpression must be instance of java.util.Collection.

Specified by:
populateInputStack in class PostfixEvaluator
InvalidExpressionFormatException - If the expression format is not in java.lang.String format.
See Also:
StringPostfixEvaluator.populateInputStack(Object), populateInputStack(Object)