#include <iterator.h>
Public Member Functions | |
| ListIterator () | |
| bool | hasNext () const | 
| bool | hasPrevious () const | 
| T & | next () throw ( NoSuchObject ) | 
| T & | previous () throw ( NoSuchObject ) | 
| void | set (const T &) | 
| void | printInternal () const | 
Private Attributes | |
| Node< T > * | current | 
| bool | atFront | 
| bool | atEnd | 
Friends | |
| class | List< T > | 
Implements a bidirectional iterator for List.
| ListIterator< T >::ListIterator | ( | ) | 
Default constructor.
| bool ListIterator< T >::hasNext | ( | ) | const | 
Returns true if this iterator has a next object.
| bool ListIterator< T >::hasPrevious | ( | ) | const | 
Returns true if this iterator has a previous object.
| T & ListIterator< T >::next | ( | ) | ||
| throw | ( | NoSuchObject | ||
| ) | ||||
Returns a reference to the next object in this iterator.
| NoSuchObject | if no such object exists in this iterator | 
| T & ListIterator< T >::previous | ( | ) | ||
| throw | ( | NoSuchObject | ||
| ) | ||||
Returns a reference to the previous object in this iterator.
| NoSuchObject | if no such object exists in this iterator | 
| void ListIterator< T >::printInternal | ( | ) | const | 
A utility method that prints the internal state of this iterator.
| void ListIterator< T >::set | ( | const T & | object | ) | 
Sets the object at the position of this iterator to the specified object.
| object | the object to be set | 
 1.8.6