title: removing duplicates from list of lists and preserving lists
body: <p>I have an arrayList of arrayLists. Each inner arraylist contains some objects with the format (name.version) .</p>
  
  <pre><code>{  {a.1,b.2,c.3} , {a.2,d.1,e.1} , {b.3,f.1,z.1}....} 
  </code></pre>
  
  <p>For example a.1 implies name = a and version is 1.</p>
  
  <p>So i want to eliminate duplicates in this arraylist of lists. For me , two objects are duplicate when they have the same name</p>
  
  <p>So essentially my output should be</p>
  
  <pre><code>{ { a.1,b.2,c.3},{d.1,e.1} ,{f.1 ,z.1} }
  </code></pre>
  
  <p>Note that i want the output in the exact same form (That is , i dont want a single list with no duplicates)</p>
  
  <p>Can someone provide me with an optimal solution for this?</p>
  
  <p>I can loop through each inner list and place the contents in the hashset. But two issues there, i cant get back the answer in 
  form of list of lists.Another issue is that when i need to override equals for that object , but i am not sure if that would
  break other code. These objects are meaningfully equal if their names are same (only in this case. I am not sure that would 
  cover the entire spectrum)</p>
  
  <p>Thanks</p>