title: Efficient way of comparing two arraylists in order to retain a delta between them
body: <p>Here's the problem that I have:</p>
  
  <p>I need to compare two ArrayLists and return if they are the same or if they are different, return the elements that are new from one of them, the pivot so to speak.</p>
  
  <p>Here's the behaviour of the data-set:</p>
  
  <ul>
  <li>the two ArrayLists are made of Strings</li>
  <li>they're populated from the same source so are most of the time the same</li>
  <li>are ordered (in the sense of the custom logic attached to them)</li>
  <li>there will never be any empty Strings</li>
  <li>all of the Strings have the same length, always</li>
  <li>no duplicates</li>
  </ul>
  
  <p>What I want:</p>
  
  <ul>
  <li>the fastest possible way of achieving my two goals, whichever the case</li>
  <li>using only Java 1.6 standard library features, I'd prefer not to implement a hybrid class that emulated something from List and then Set for example.</li>
  </ul>
  
  <p>Example:</p>
  
  <pre><code>A: [ 'a', 'b', 'c', 'd']   
  
  B: [ 'a', 'c', 'd']
  </code></pre>
  
  <p>Result: Lists are different, return the element 'b'; A will be the 'work' List, we will make comparisons based on what's new in this ArrayList, since B will never change.</p>
  
  <p>Thanks for any replies and your input.</p>