All Packages Class Hierarchy This Package Previous Next Index
Class DataStructures.PreOrder
java.lang.Object
|
+----DataStructures.TreeIterator
|
+----DataStructures.PreOrder
- public class PreOrder
- extends DataStructures.TreeIterator
Preorder iterator class.
-
PreOrder(BinarySearchTree)
- Construct the iterator.
-
advance()
- Advance the current position to the next node in the tree,
according to the preorder traversal scheme.
-
first()
- Set the current position to the first item, according
to the preorder traversal scheme.
PreOrder
public PreOrder(DataStructures.BinarySearchTree theTree)
- Construct the iterator.
The current position is set to null.
- Parameters:
- theTree - the tree to which the iterator is
permanently bound.
first
public void first()
- Set the current position to the first item, according
to the preorder traversal scheme.
- Overrides:
- first in class DataStructures.TreeIterator
advance
public void advance() throws Exceptions.ItemNotFound
- Advance the current position to the next node in the tree,
according to the preorder traversal scheme.
- Throws: ItemNotFound
- if the current position is null.
- Overrides:
- advance in class DataStructures.TreeIterator
All Packages Class Hierarchy This Package Previous Next Index