- Inherits from:
- Object
- Declared in:
- DHashTable.h
Object
|
+---DHashIterator
Class Description
The DHashIterator class implements a number of methods for iterating hash tables.
- Last modified:
- 31-Oct-2007 (DHashTable.h)
Instance Variables
- private DHashTable *_table
- the table on which the iterator operates
- private DHashNode *_node
- the current node in the list
- private unsigned long _index
- the current index in the hash table
- the constructors
- - (DHashIterator *) init
- Initialise a hash iterator without a table
- Returns:
- the iterator
- - (DHashIterator *) init :(DHashTable *) table
- Initialises an iterator on a hash table (the iterator is moved to the first node)
- Parameters:
- table - the hash table on which the iterator operates
- Returns:
- the iterator
- the iterator methods
- - (id) first
- Get the first object in the table
- Returns:
- the first object (or nil)
- - (DHashIterator *) hashTable :(DHashTable *) table
- Set the table (iterator is moved to the first object)
- Returns:
- the object
- - (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 table
- Returns:
- the last object (or nil)
- - (id) next
- Get the next object in the table
- 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 stored in current node
- Returns:
- the previous stored object (or nil)
- - (id) prev
- Get the previous object in the table
- Returns:
- the previous object (or nil)
generated 05-Nov-2007 by ObjcDoc 3.0.0