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 int
Number of modifications of the tree at the time this iterator is created.private AVLTree.TreeNode
<T> A node that is returned next ornull
if all nodes are traversed -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
nextNode
A node that is returned next ornull
if 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:
hasNext
in interfaceIterator<AVLTree.TreeNode<T>>
-
next
- Specified by:
next
in interfaceIterator<AVLTree.TreeNode<T>>
-
checkForComodification
private void checkForComodification()Checks if the tree has been modified during the iteration process
-