title: How to iterate over Multimap in insertion order?
body: <p>Using the new collections from Google's Guava, <a href="http://code.google.com/p/guava-libraries/wiki/NewCollectionTypesExplained" rel="noreferrer">http://code.google.com/p/guava-libraries/wiki/NewCollectionTypesExplained</a></p>
  
  <p>How do I loop over a MultiMap for each key in the order of insertion?</p>
  
  <p>For example</p>
  
  <pre><code>multimap = new HashMultiMap&lt;String,String&gt;();
  multimap.put("1", "value1");
  multimap.put("1", "value2");
  multimap.put("1", "value3");
  
  multimap.put("2", "value11");
  multimap.put("2", "value22");
  multimap.put("2", "value33");
  
  multimap.put("3", "value111");
  multimap.put("3", "value222");
  multimap.put("3", "value333");
  </code></pre>
  
  <p>On each loop I need</p>
  
  <pre><code>"value1", "value11", "value111";
  </code></pre>
  
  <p>then the next loop</p>
  
  <pre><code>"value2", "value22", "value222";
  </code></pre>
  
  <p>and so on:</p>
  
  <pre><code>"value3", "value33", "value333";
  </code></pre>