MapIterator< K, V > Class Template Reference

#include <iterator.h>

List of all members.

Public Member Functions

 MapIterator ()
bool hasNext () const
bool hasPrevious () const
V & next () throw ( NoSuchObject )
V & previous () throw ( NoSuchObject )
void put (const V &)
void printInternal () const

Private Attributes

Node< K, V > * current
bool atFront
bool atEnd

Friends

class Map< K, V >

Detailed Description

template<typename K, typename V>
class MapIterator< K, V >

Implements a bidirectional iterator for Map.

Author:
Mark Maloof
Version:
1.0, 3/13/13

Constructor & Destructor Documentation

template<typename K , typename V >
MapIterator< K, V >::MapIterator (  )  [inline]

Default constructor.


Member Function Documentation

template<typename K , typename V >
bool MapIterator< K, V >::hasNext (  )  const [inline]

Returns true if this iterator has a next value.

Returns:
true if this iterator has a next value; false otherwise.
template<typename K , typename V >
bool MapIterator< K, V >::hasPrevious (  )  const [inline]

Returns true if this iterator has a previous value.

Returns:
true if this iterator has a previous value; false otherwise.
template<typename K , typename V >
V & MapIterator< K, V >::next (  )  throw ( NoSuchObject ) [inline]

Returns a reference to the next value in this iterator.

Returns:
a reference to the next value
Exceptions:
NoSuchObject if no such value exists in this iterator
template<typename K , typename V >
V & MapIterator< K, V >::previous (  )  throw ( NoSuchObject ) [inline]

Returns a reference to the previous value in this iterator.

Returns:
a reference to the previous value
Exceptions:
NoSuchObject if no such value exists in this iterator
template<typename K , typename V >
void MapIterator< K, V >::printInternal (  )  const [inline]

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

template<typename K , typename V >
void MapIterator< K, V >::put ( const V &  value  )  [inline]

Puts the value at the position of this iterator to the specified value.

Parameters:
value the value to be set

The documentation for this class was generated from the following file:
Generated on Sat Mar 16 11:19:43 2013 by  doxygen 1.6.3