#include <coherence/util/ListIterator.hpp>
Inherits Iterator.
Inherited by ListMuterator [virtual].
A ListIterator has no current element; its cursor position always lies between the element that would be returned by a call to previous() and the element that would be returned by a call to next(). In a list of length n, there are n+1 valid index values, from 0 to n, inclusive.
Public Types | |
| typedef spec::Handle | Handle |
| ListIterator Handle definition. | |
| typedef spec::View | View |
| ListIterator View definition. | |
| typedef spec::Holder | Holder |
| ListIterator Holder definition. | |
Public Member Functions | |
| virtual size32_t | nextIndex () const =0 |
| Return the index of the next element to be returned from a call to next(). | |
| virtual size32_t | previousIndex () const =0 |
| Return the index of the element to be returned from a call to previous(). | |
| virtual bool | hasPrevious () const =0 |
| Returns true if this list iterator has more elements when traversing the list in the reverse direction. | |
| virtual Object::Holder | previous ()=0 |
| Returns the previous element in the list. | |
| virtual size32_t nextIndex | ( | ) | const [pure virtual] |
Return the index of the next element to be returned from a call to next().
Implemented in WrapperCollections::AbstractWrapperListIterator.
| virtual size32_t previousIndex | ( | ) | const [pure virtual] |
Return the index of the element to be returned from a call to previous().
Implemented in WrapperCollections::AbstractWrapperListIterator.
| virtual bool hasPrevious | ( | ) | const [pure virtual] |
Returns true if this list iterator has more elements when traversing the list in the reverse direction.
Implemented in WrapperCollections::AbstractWrapperListIterator.
| virtual Object::Holder previous | ( | ) | [pure virtual] |
Returns the previous element in the list.
Implemented in WrapperCollections::AbstractWrapperListIterator.