ObjectiveLib  1.0.0
Public Member Functions
OLAssociativeIterator Class Reference

An iterator for traversing associative containers like sets and maps. More...

#import <ObjectiveLib/Iterator.h>

Inheritance diagram for OLAssociativeIterator:
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) - copyWithZone:
 Make a copy of this iterator allocating memory from zone.
(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 associative containers like sets and maps.

This is a basic bidirectional iterator that knows how to find its way around associative containers.

See also:
OLMap, OLMultiMap, OLSet, OLMultiSet

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:
objectthe object to assign
Returns:
a reference to this iterator

Reimplemented from OLIterator.

- (id) copyWithZone: (NSZone *)  zone

Make a copy of this iterator allocating memory from zone.

Parameters:
zonethe zone from which to allocate memory
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:
objectthe 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 Sat Feb 15 2014 07:45:34, © 2004-2007 Will Mason