Top Description Methods
org.apache.commons.collections4

public Interface IterableGet<K, V>

extends Get<K, V>
Known Direct Subinterfaces
org.apache.commons.collections4.IterableMap
Known Direct Implementers
org.apache.commons.collections4.splitmap.AbstractIterableGetMapDecorator
Type Parameters
<K>
the type of the keys in this map
<V>
the type of the values in this map

The "read" subset of the java.util.Map interface.
Since
4.0
See Also
Put

Method Summary

Modifier and TypeMethod and Description
public MapIterator<K, V>

Returns:

a map iterator
mapIterator
()

Obtains a MapIterator over the map.

Inherited from org.apache.commons.collections4.Get:
containsKeycontainsValueentrySetgetisEmptykeySetremovesizevalues

Method Detail

mapIteratorback to summary
public MapIterator<K, V> 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