oracle.javatools.parser.util
Class ExpressionStack
java.lang.Object
oracle.javatools.parser.util.ArrayListHeap
oracle.javatools.parser.util.ExpressionStack
- public class ExpressionStack
- extends ArrayListHeap
The ExpressionStack is used for generating an expression tree out of
a stream of expressions in infix notation. Expressions should implement
the ExpressionObject interface.
To use, instantiate an ExpressionStack object and provide your stream
of expressions to this ExpressionStack via the add(...) method. When
done, call process() to process through the expressions and generate
the expression tree. The tree is built via ExpressionObject's
addOperand(...) and closeOperator(...) methods.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionStack
public ExpressionStack()
add
public void add(ExpressionObject e)
- Adds an ExpressionObject as in an infix stream.
setClosingArgument
public void setClosingArgument(java.lang.Object arg)
process
public ExpressionObject process()
- Takes the stream of ExpressionObjects in infix order via the method
add(...) and generates a tree of ExpressionObjects.
- Returns:
- The root ExpressionObject of the new tree.
Copyright © 1997, 2004, Oracle. All rights reserved.