- java.lang.Object
-
- org.jgrapht.util.AVLTree.TreeNodeIterator
-
- All Implemented Interfaces:
java.util.Iterator<AVLTree.TreeNode<T>>
private class AVLTree.TreeNodeIterator extends java.lang.Object implements java.util.Iterator<AVLTree.TreeNode<T>>
Iterator over the tree nodes. The nodes are returned according to the in order tree traversal.
-
-
Field Summary
Fields Modifier and Type Field Description private int
expectedModCount
Number of modifications of the tree at the time this iterator is created.private AVLTree.TreeNode<T>
nextNode
A node that is returned next ornull
if all nodes are traversed
-
Constructor Summary
Constructors Constructor Description TreeNodeIterator()
Constructs a newTreeNodeIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkForComodification()
Checks if the tree has been modified during the iteration processboolean
hasNext()
AVLTree.TreeNode<T>
next()
-
-
-
Field Detail
-
nextNode
private AVLTree.TreeNode<T> nextNode
A node that is returned next ornull
if all nodes are traversed
-
expectedModCount
private final int expectedModCount
Number of modifications of the tree at the time this iterator is created.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<AVLTree.TreeNode<T>>
-
next
public AVLTree.TreeNode<T> next()
- Specified by:
next
in interfacejava.util.Iterator<AVLTree.TreeNode<T>>
-
checkForComodification
private void checkForComodification()
Checks if the tree has been modified during the iteration process
-
-