Package com.github.javaparser.ast
Class Node.PostOrderIterator.Level
- java.lang.Object
-
- com.github.javaparser.ast.Node.PostOrderIterator.Level
-
- Enclosing class:
- Node.PostOrderIterator
private static class Node.PostOrderIterator.Level extends java.lang.ObjectRepresents 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandone()Returnstrueif the last node was reached.NodegetCurrent()Returns the current node.voidgoToNext()Sets the next node as the current node.booleanisCurrentExpanded()Returnstrueif the current node was expanded.voidsetCurrentExpanded()Marks the current node as expanded.
-
-
-
Field Detail
-
nodes
private final java.util.List<Node> nodes
-
index
private int index
-
expanded
private boolean expanded
-
-
Constructor Detail
-
Level
public Level(java.util.List<Node> nodes)
-
-
Method Detail
-
done
public boolean done()
Returnstrueif the last node was reached.- Returns:
trueif the last node was reached
-
getCurrent
public Node 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()
Returnstrueif the current node was expanded.- Returns:
trueif the current node was expanded
-
-