title: Iterate to find a Map entry at an index?
body: <p>I have a LinkedHashMap. I want to get the Foo at index N. Is there a better way of doing this besides iterating until I find it?:</p>
  
  <pre><code>int target = N;
  int index = 0;
  for (Map.Entry&lt;String, Foo&gt; it : foos.entrySet()) {
      if (index == target) {
          return it.getValue();
      }
      index++;
  }
  </code></pre>
  
  <p>I have to do get random elements from the map by an index about 50 times for some operation. The map will have about 20 items in it.</p>
  
  <p>Thanks</p>