src/main/java/org/jivesoftware/smack/util/collections/AbstractHashedMap.java
public MapIterator<K, V> mapIterator() {
        if (size == 0) {
            return EmptyMapIterator.INSTANCE;
        }
        return new HashMapIterator<K, V>(this);
    }
public MapIterator<K, V> mapIterator() {
        if (size == 0) {
            return EmptyMapIterator.INSTANCE;
        }
        return new HashMapIterator<K, V>(this);
    }
Gets an iterator over the map. Changes made to the iterator affect this
map.
<p/>
A MapIterator returns the keys in the map. It also provides convenient
methods to get the key and value, and set the value. It avoids the need
to create an entrySet/keySet/values object. It also avoids creating the
Map.Entry object.

@return the map iterator