ListIterator< T > Class Template Reference

#include <iterator.h>

List of all members.

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 >


Detailed Description

template<typename T>
class ListIterator< T >

Implements a bidirectional iterator for List.

Author:
Mark Maloof
Version:
1.0, 3/25/10

Constructor & Destructor Documentation

template<typename T>
ListIterator< T >::ListIterator (  )  [inline]

Default constructor.


Member Function Documentation

template<typename T>
bool ListIterator< T >::hasNext (  )  const [inline]

Returns true if this iterator has a next object.

Returns:
true if this iterator has a next object; false otherwise.

template<typename T>
bool ListIterator< T >::hasPrevious (  )  const [inline]

Returns true if this iterator has a previous object.

Returns:
true if this iterator has a previous object; false otherwise.

template<typename T>
T & ListIterator< T >::next (  )  throw ( NoSuchObject ) [inline]

Returns a reference to the next object in this iterator.

Returns:
a reference to the next object
Exceptions:
NoSuchObject if no such object exists in this iterator

template<typename T>
T & ListIterator< T >::previous (  )  throw ( NoSuchObject ) [inline]

Returns a reference to the previous object in this iterator.

Returns:
a reference to the previous object
Exceptions:
NoSuchObject if no such object exists in this iterator

template<typename T>
void ListIterator< T >::set ( const T &  object  )  [inline]

Sets the object at the position of this iterator to the specified object.

Parameters:
object the object to be set

template<typename T>
void ListIterator< T >::printInternal (  )  const [inline]

A utility method that prints the internal state of this iterator.


The documentation for this class was generated from the following file:

Generated on Thu Mar 25 14:11:21 2010 by  doxygen 1.5.5