Class AbstractIterableMap<K,​V>

    • Constructor Detail

      • AbstractIterableMap

        public AbstractIterableMap()
    • Method Detail

      • mapIterator

        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 =;
           Integer value = it.getValue();
           it.setValue(value + 1);
        Specified by:
        mapIterator in interface IterableGet<K,​V>
        a map iterator