#import <ObjectiveLib/Deque.h>
Inheritance diagram for OLDequeIterator:
Public Member Functions | |
(id) | - advance |
Advance the iterator. | |
(id) | - advanceBy: |
Advance or reverse the iterator by a given number of positions. | |
(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. | |
(int) | - difference: |
Compute the number of positions that lie between this iterator and another one. | |
(BOOL) | - isEqual: |
Return whether this object is equal to another one. | |
(id) | - reverse |
Reverse the iterator by one position. | |
Protected Attributes | |
id * | current |
The current object in view. | |
id * | first |
The first valid item in this node of the deque. | |
id * | last |
The last valid item in this node of the deque. | |
id ** | node |
The node currently in view. |
This is a basic random access iterator that is specialized to understand queues.
- (id) advance |
Advance the iterator.
After advancing the iterator will point to a position in the container one step beyond the previous position.
Reimplemented from OLForwardIterator.
- (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 from OLRandomAccessIterator.
- (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.
object | the object to assign |
Reimplemented from OLIterator.
- (id) copy |
- (id) dereference |
Dereference the iterator.
Return the id of the object to which this iterator points.
Reimplemented from OLIterator.
- (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 from OLRandomAccessIterator.
- (BOOL) isEqual: | (id) | object |
Return whether this object is equal to another one.
object | the object to test |
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.
Reimplemented from OLBidirectionalIterator.
- (id*) current [protected] |
The current object in view.
- (id*) first [protected] |
The first valid item in this node of the deque.
- (id*) last [protected] |
The last valid item in this node of the deque.
- (id**) node [protected] |
The node currently in view.
|