java.util.Map interface.
Put
| Modifier and Type | Method and Description |
|---|---|
| public MapIterator |
| mapIterator | back to summary |
|---|---|
| public MapIterator Obtains a 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);
}
| |