ObjectiveLib
1.0.0
|
An iterator that provides random access. More...
#import <ObjectiveLib/Iterator.h>
Public Member Functions | |
(id) | - advanceBy: |
Advance or reverse the iterator by a given number of positions. | |
(int) | - difference: |
Compute the number of positions that lie between this iterator and another one. |
An iterator that provides random access.
The iterator can be made to refer to any member of a collection with one operation.
- (id) advanceBy: | (int) | count |
Advance or reverse the iterator by a given number of positions.
count | the number of positions to move the iterator, either forward or backward |
Reimplemented in OLArrayIterator, OLBitIterator, and OLDequeIterator.
- (int) difference: | (OLRandomAccessIterator *) | other |
Compute the number of positions that lie between this iterator and another one.
If other is after this iterator in the collection, the result will be negative, otherwise the result will be greater than or equal to zero..
other | the iterator for which to compute the distance from this one |
Reimplemented in OLArrayIterator, OLBitIterator, and OLDequeIterator.
|