#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 |
Friends | |
class | List< T > |
ListIterator< T >::ListIterator | ( | ) | [inline] |
Default constructor.
bool ListIterator< T >::hasNext | ( | ) | const [inline] |
Returns true if this iterator has a next object.
bool ListIterator< T >::hasPrevious | ( | ) | const [inline] |
Returns true if this iterator has a previous object.
T & ListIterator< T >::next | ( | ) | throw ( NoSuchObject ) [inline] |
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 ) [inline] |
Returns a reference to the previous object in this iterator.
NoSuchObject | if no such object exists in this iterator |
void ListIterator< T >::set | ( | const T & | object | ) | [inline] |
Sets the object at the position of this iterator to the specified object.
object | the object to be set |
void ListIterator< T >::printInternal | ( | ) | const [inline] |
A utility method that prints the internal state of this iterator.