Top Description Constructors Methods
org.apache.commons.collections4.map

public abstract Class AbstractIterableMap<K, V>

extends Object
implements IterableMap<K, V>
Class Inheritance
All Implemented Interfaces
org.apache.commons.collections4.IterableMap, org.apache.commons.collections4.IterableGet, org.apache.commons.collections4.Get, org.apache.commons.collections4.Put, java.util.Map
Known Direct Subclasses
org.apache.commons.collections4.map.AbstractMapDecorator, org.apache.commons.collections4.map.CompositeMap, org.apache.commons.collections4.map.StaticBucketMap
Type Parameters
<K>
the type of the keys in this map
<V>
the type of the values in this map
Imports
org.apache.commons.collections4.IterableMap, .MapIterator

Provide a basic IterableMap implementation.
Since
4.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public MapIterator<K, V>
mapIterator()

Implements org.apache.commons.collections4.IterableGet.mapIterator.

Obtains a MapIterator over the map.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractIterableMapback to summary
public AbstractIterableMap()

Method Detail

mapIteratorback to summary
public MapIterator<K, V> mapIterator()

Implements org.apache.commons.collections4.IterableGet.mapIterator.

Doc from org.apache.commons.collections4.IterableGet.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 use Map Entry objects.

IterableMap<String,Integer> map = new HashedMap<String,Integer>();
MapIterator<String,Integer> it = map.mapIterator();
while (it.hasNext()) {
  String key = it.next();
  Integer value = it.getValue();
  it.setValue(value + 1);
}
Returns:MapIterator<K, V>

a map iterator

Annotations
@Override