org.apache.beehive.netui.util.iterator
Class MapIterator

Object
  extended by MapIterator
All Implemented Interfaces:
Iterator

public class MapIterator
extends Object
implements Iterator

This class implements the Iterator interface for accessing the set of values stored in a Map.


Constructor Summary
MapIterator(Map map)
          Create the Iterator for the given Map
 
Method Summary
 boolean hasNext()
          Advance to the next value in the Map.
 Object next()
          Advance to the next item in the Map
 void remove()
          Remove the current item in the iterator.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapIterator

public MapIterator(Map map)
Create the Iterator for the given Map

Parameters:
map -
Method Detail

hasNext

public boolean hasNext()
Advance to the next value in the Map.

Specified by:
hasNext in interface Iterator
Returns:
true if there is a next item; false otherwise

next

public Object next()
Advance to the next item in the Map

Specified by:
next in interface Iterator
Returns:
the next item
Throws:
NoSuchElementException - if the map has no more elements

remove

public void remove()
Remove the current item in the iterator.

Specified by:
remove in interface Iterator