- Inherits from:
- Object
- Declared in:
- DList.h
Object
|
+---DListIterator
Class Description
The DListIterator class implements a number of methods for iterating lists.
- Last modified:
- 27-Feb-2005 (DList.h)
Instance Variables
- private DList *_list
- the list on which the iterator operates
- private DListNode *_node
- the current node in the list
- the constructors
- - (DListIterator *) init
- Initialise a list iterator without a list
- Returns:
- the iterator
- - (DListIterator *) init :(DList *) list
- Initialise a list iterator with a list (the iterator is moved to the first node)
- Parameters:
- list - the list on which the iterator operates
- Returns:
- the iterator
- the iterator methods
- - (DListIterator *) after :(id) obj
- Insert a new object after the current object (iterator is moved to the new object)
- Parameters:
- obj - the object to be added after the current object
- Returns:
- the iterator
- - (DListIterator *) before :(id) obj
- Insert a new object before the current object (iterator is moved to the new object)
- Parameters:
- obj - the object to be added before the current object
- Returns:
- the iterator
- - (id) first
- Get the first object in the list
- Returns:
- the first object (or nil)
- - (id) last
- Get the last object in the list
- Returns:
- the last object (or nil)
- - (DListIterator *) list :(DList *) list
- Set the list (iterator is moved to the first object)
- Returns:
- the iterator
- - (id) next
- Get the next object in the list
- 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 list
- Returns:
- the previous object (or nil)
generated 08-Jan-2006 by ObjcDoc 3.0.0