title: Java compare unordered ArrayLists
body: <p>anybody know an efficient way to decide if two arraylists contain the same values?</p>
  
  <p>Code:</p>
  
  <pre><code>ArrayList&lt;String&gt; dummy1= new ArrayList&lt;String&gt;();
  list1.put("foo");
  list1.put("baa");
  
  ArrayList&lt;String&gt; dummy2= new ArrayList&lt;String&gt;();
  list1.put("baa");
  list1.put("foo");
  
  dummy1 == dummy2
  </code></pre>
  
  <p>the challenge is that the arraylists has not the same value order..</p>
  
  <pre><code>(foo, baa) == (foo, baa) // per definition :)
  </code></pre>
  
  <p>i need to get this</p>
  
  <pre><code>(foo, baa) == (baa, foo) // true
  </code></pre>
  
  <p>so what would be your approach?</p>