title: Java HashMap: How to get a key and value by index?
body: <p>I am trying to use a HashMap to map a unique string to a string ArrayList like this:</p>
  
  <pre><code>HashMap&lt;String, ArrayList&lt;String&gt;&gt;
  </code></pre>
  
  <p>Basically, I want to be able to access the keys by number, not by using the key's name. And I want to be able to access said key's value, to iterate over it. I'm imagining something like this:</p>
  
  <pre><code>for(all keys in my hashmap) {
      for(int i=0; i &lt; myhashmap.currentKey.getValue.size(); i++) {
          // do things with the hashmaps elements
      }
  }
  </code></pre>
  
  <p>Is there an easy way to do this?</p>