org.apache.commons.collections
Interface IterableMap

public interface IterableMap
extends Map
Defines a map that can be iterated directly without needing to create an entry set.

A map iterator is an efficient way of iterating over maps. There is no need to access the entry set or cast to Map Entry objects.

 IterableMap map = new HashedMap();
 MapIterator it = map.mapIterator();
 while (it.hasNext()) {
   Object key = it.next();
   Object value = it.getValue();
   it.setValue("newValue");
 }
 
SinceCommons Co
Version$Revision:
AuthorStephen Colebourne
Wiki javadoc Use textile entry format.
Add your comments here.
Method Summary
MapIterator mapIterator()
Obtains a MapIterator over the map.
mapIterator
public MapIterator mapIterator ( )
Obtains a MapIterator over the map.

A map iterator is an efficient way of iterating over maps. There is no need to access the entry set or cast to Map Entry objects.

 IterableMap map = new HashedMap();
 MapIterator it = map.mapIterator();
 while (it.hasNext()) {
   Object key = it.next();
   Object value = it.getValue();
   it.setValue("newValue");
 }
 
Wiki javadoc Use textile entry format.
Add your comments here.