title: Remove Duplicates from Two Dimensional ArrayList
body: <p>I have a two dimensional ArrayList that I need to filter the duplicates out of.  </p>
  
  <p>current result of generateRows: [["one"], ["two"], ["three"], ["one"]]</p>
  
  <p><em><strong>Java Pseudo Code:</em></strong></p>
  
  <pre><code>ArrayList&lt;ArrayList&lt;String&gt;&gt; rows = new ArrayList&lt;ArrayList&lt;String&gt;&gt;();
  rows = generateRows(); //method not shown, but returns a ArrayList&lt;ArrayList&lt;String&gt;&gt;
  Set&lt;String&gt; set = new LinkedHashSet&lt;String&gt;();
  for (ArrayList&lt;String&gt; list:rows) {
      set.addAll (list);
  }
  rows.clear();
  rows.add(new ArrayList&lt;String&gt;(set));
  </code></pre>
  
  <p>current result after running above conversion code: [[one, two, three]]</p>
  
  <p>desired result: [["one"], ["two"], ["three"]]</p>