title: How can I compare two MultiMaps?
body: <p>I have two Multimaps which have been created from two huge CSV files. </p>
  
  <pre><code>Multimap&lt;String, SomeClassObject&gt; mapOne = ArrayListMultimap.create();
  Multimap&lt;String, SomeClassObject&gt; mapTwo = ArrayListMultimap.create();
  </code></pre>
  
  <p>I have assumed one CSV column to be as a Key and each of the Key has thousands of values associated with it. Data contained within these <code>Multimap</code>s should be same. Now I want to compare the data within these <code>Multimap</code>s and find if any values are different. Here are the two approaches I am thinking of:</p>
  
  <p><strong>Approach One:</strong></p>
  
  <p>Make one big list from the <code>Multimap</code>. This big list will contain a few individual lists. Each of the smaller lists contains a unique value which is the "key" read from <code>Multimap</code> along with its associated values, which will form the rest of that individual list.</p>
  
  <pre><code>ArrayList&lt;Collection&lt;SomeClassObject&gt;&gt; bigList = new ArrayList&lt;Collection&lt;SomeClassObject&gt;&gt;();
  </code></pre>
  
  <p>Within <code>bigList</code> will be individual small lists A, B, C etc.</p>
  
  <p>I plan on picking individual lists from each <code>bigList</code> of the two files on the basis of checking that individual list from second <code>Multimap</code> contains that "key" element. If it does, then compare both of these lists and find anything that could not be matched.</p>
  
  <p><strong>Approach Two:</strong></p>
  
  <p>Compare both the <code>Multimap</code>s but I am not sure how will that be done.</p>
  
  <p>Which approach should have smaller execution time? I need the operation to be completed in minimum amount of time.</p>