Iterating over keys and values in a Map
<p>Sometimes I find myself duplicating code to extract both key and value entries from a Map (when testing/debugging a third-party API, for example). </p>

<pre><code>Map&lt;String, String&gt; someMap;
Set&lt;String&gt; keys = someMap.keySet();
for(int j=0;j&lt;someMap.size();j++){
    String key = (String) keys.toArray()[j];
    System.out.println("key &gt; " + key + "  : value = " + someMap.get(key));
}
</code></pre>

<p>I know Groovy has some great abstractions for this (e.g. <a href="http://stackoverflow.com/questions/4898062/get-key-in-groovy-maps">Get key in groovy maps</a>), but I'm constrained to POJ. Surely there must be a more elegant and less verbose way to do this, in Java I mean? </p>
