Class AVLTree.TreeNodeIterator
java.lang.Object
org.jgrapht.util.AVLTree.TreeNodeIterator
- All Implemented Interfaces:
Iterator<AVLTree.TreeNode<T>>
Iterator over the tree nodes. The nodes are returned according to the in order tree
traversal.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intNumber of modifications of the tree at the time this iterator is created.private AVLTree.TreeNode<T> A node that is returned next ornullif all nodes are traversed -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
nextNode
A node that is returned next ornullif all nodes are traversed -
expectedModCount
private final int expectedModCountNumber of modifications of the tree at the time this iterator is created.
-
-
Constructor Details
-
TreeNodeIterator
public TreeNodeIterator()Constructs a newTreeNodeIterator
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<AVLTree.TreeNode<T>>
-
next
- Specified by:
nextin interfaceIterator<AVLTree.TreeNode<T>>
-
checkForComodification
private void checkForComodification()Checks if the tree has been modified during the iteration process
-