Inefficient use of keySet iterator instead of entrySet iterator Resolve

I use entrySet instead of Keyset to improve performance.

It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.