Package com.github.javaparser.ast
Class Node.PostOrderIterator.Level
java.lang.Object
com.github.javaparser.ast.Node.PostOrderIterator.Level
- Enclosing class:
Node.PostOrderIterator
Represents a level in the traversal stack during the post-order iteration. A level consists of a list of
siblings to be traversed, an index indicating the current node, and a flag to indicate if the current node
has been expanded, i.e., if its children have been processed.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
nodes
-
index
private int index -
expanded
private boolean expanded
-
-
Constructor Details
-
Level
-
-
Method Details
-
done
public boolean done()Returnstrue
if the last node was reached.- Returns:
true
if the last node was reached
-
getCurrent
Returns the current node.- Returns:
- the current node
-
goToNext
public void goToNext()Sets the next node as the current node. -
setCurrentExpanded
public void setCurrentExpanded()Marks the current node as expanded. -
isCurrentExpanded
public boolean isCurrentExpanded()Returnstrue
if the current node was expanded.- Returns:
true
if the current node was expanded
-