OLListIterator Class Reference
[Iterators]

An iterator for traversing linked lists. More...

#import <ObjectiveLib/List.h>

Inheritance diagram for OLListIterator:

Inheritance graph
[legend]
List of all members.

Public Member Functions

(id) - advance
 Advance the iterator.
(id) - assign:
 Assign an object to the position in the controlled sequence to which this iterator refers.
(id) - copy
 Make a copy of this iterator.
(id) - dereference
 Dereference the iterator.
(BOOL) - isEqual:
 Return whether this object is equal to another one.
(id) - reverse
 Reverse the iterator by one position.

Detailed Description

An iterator for traversing linked lists.

This is a basic bidirectional iterator that is specialized to understand how lists work.

See also:
OLList


Member Function Documentation

- (id) advance  

Advance the iterator.

After advancing the iterator will point to a position in the container one step beyond the previous position.

Returns:
a reference to this iterator

Reimplemented from OLForwardIterator.

- (id) assign: (id)  object  

Assign an object to the position in the controlled sequence to which this iterator refers.

The object currently at the position will be removed and replaced with the given object.

Parameters:
object the object to assign
Returns:
a reference to this iterator

Reimplemented from OLIterator.

- (id) copy  

Make a copy of this iterator.

Returns:
a copy of this iterator

Reimplemented from OLIterator.

- (id) dereference  

Dereference the iterator.

Return the id of the object to which this iterator points.

Returns:
the id of the referenced object

Reimplemented from OLIterator.

- (BOOL) isEqual: (id)  object  

Return whether this object is equal to another one.

Parameters:
object the object to test
Returns:
YES if the iterator is equal to the object, NO if not

Reimplemented from OLIterator.

- (id) reverse  

Reverse the iterator by one position.

After reversing the iterator will point to a position in the container one step before the previous position.

Returns:
a reference to this iterator

Reimplemented from OLBidirectionalIterator.


The documentation for this class was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:18:47 2007, © 2004-2007 Will Mason
SourceForge.net Logo