| Modifier and Type | Field and Description |
|---|---|
| private AST | |
| private LinkedList |
| Access | Constructor and Description |
|---|---|
| public | ASTIterator(AST
THe tree whose nodes are to be iterated tree)Constructs an Iterator for depth-first iteration of an AST |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | |
| public Object | |
| public AST | |
| private AST | |
| private void | |
| public void | remove()
Overrides default java. |
| next | back to summary |
|---|---|
| private AST next | |
| parents | back to summary |
|---|---|
| private LinkedList<AST> parents | |
| ASTIterator | back to summary |
|---|---|
| public ASTIterator(AST tree) Constructs an Iterator for depth-first iteration of an AST
| |
| down | back to summary |
|---|---|
| private void down() | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the iteration. | |
| nextNode | back to summary |
|---|---|
| public AST nextNode() Get the next node to be returned from iteration.
| |
| pop | back to summary |
|---|---|
| private AST pop() | |
| push | back to summary |
|---|---|
| private void push(AST parent) | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |