- Inherits from:
- Object
- Declared in:
- DAvlTree.h
Object
|
+---DAvlIterator
Class Description
The DAvlIterator class contains a number of methods for iterating a avl tree.
- Last modified:
- 27-Feb-2005 (DAvlTree.h)
Instance Variables
- private DAvlTree *_tree
- the tree on which the iterator operates
- private DAvlNode *_node
- the current node in the list
- the constructors
- - (DAvlIterator *) init
- Initialises an avl tree iterator without a tree
- Returns:
- the iterator
- - (DAvlIterator *) init :(DAvlTree *) tree
- Initialises an iterator on a tree (the iterator is moved to the first node)
- Parameters:
- tree - the tree on which the iterator operates
- Returns:
- the iterator
- the iterator methods
- - (id) first
- Get the first object in the tree
- Returns:
- a reference to the first object (or nil)
- - (id) key
- Get the key of the current object
- Returns:
- a referencee to the key of the current object (or nil)
- - (id) last
- Get the last object in the tree
- Returns:
- the last object (or nil)
- - (id) next
- Get the next object in the tree
- Returns:
- the next object (or nil)
- - (id) object
- Get the current object
- Returns:
- the current object (or nil)
- - (id) object :(id) object
- Set the current object to another object
- Parameters:
- object - the object to be placed in current node
- Returns:
- the previous stored object
- - (id) prev
- Get the previous object in the tree
- Returns:
- the previous object (or nil)
- - (DAvlIterator *) tree :(DAvlTree *) tree
- Set the avl tree (iterator is moved to the first object)
- Returns:
- the object
generated 08-Jan-2006 by ObjcDoc 3.0.0