title: Foreach Key/Value pair issue
body: <p>I'm trying to convert a PHP script into a Java one but coming across a few issues on a <code>foreach</code> loop. In the PHP script I have a <code>foreach</code> that takes the key:value pair and based off this does a <code>str_replace</code>.</p>
  <pre><code>foreach ($pValues AS $vKey =&gt; $vValue)
        $vString = str_replace(&quot;{&quot;.$vKey.&quot;}&quot;, &quot;'&quot;.$vValue.&quot;'&quot;, $vString);
  </code></pre>
  <p>I tried replicating this in Java without success. I need to get the key from the array to use in the string replace function, but can't  find out where or if it's possible to get the key name from the array passed in.</p>
  <p>Is this the right way or am I completely off? Should I be using the <code>ImmutablePair</code> method?</p>
  <pre><code>for (String vKey : pValues)
        // String replace
  </code></pre>
  <p>Here's hoping there is an easy way to get the key:value pair in Java.</p>