Top Description Methods
org.apache.commons.collections4

public Interface IterableMap<K, V>

extends Map<K, V>, Put<K, V>, IterableGet<K, V>
Known Direct Subinterfaces
org.apache.commons.collections4.MultiMap, org.apache.commons.collections4.OrderedMap, org.apache.commons.collections4.BidiMap, org.apache.commons.collections4.BoundedMap
Known Direct Implementers
org.apache.commons.collections4.SplitMapUtils.WrappedGet, org.apache.commons.collections4.map.AbstractHashedMap, org.apache.commons.collections4.map.AbstractIterableMap, org.apache.commons.collections4.map.Flat3Map
Type Parameters
<K>
the type of the keys in this map
<V>
the type of the values in this map
Imports
java.util.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 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);
}
Since
3.0

Method Summary

Inherited from java.util.Map:
clearcomputecomputeIfAbsentcomputeIfPresentcontainsKeycontainsValuecopyOfentryentrySetequalsforEachgetgetOrDefaulthashCodeisEmptykeySetmergeofofofofofofofofofofofofEntriesputputAllputIfAbsentremoveremovereplacereplacereplaceAllsizevalues
Inherited from org.apache.commons.collections4.IterableGet:
mapIterator
Inherited from org.apache.commons.collections4.Put:
clearputputAll