title: Collection Utils removing duplicates object
body: <p>I have an Object Person(id, name).</p>
  
  <pre><code>public class Person {
  
  
  /** Personid. **/
  private Long personId;
  
  /** Person Adresse. **/
  private String adresse
  
  // Getters, Setters
  </code></pre>
  
  <p>How can i remove duplicate person (who have same id) using CollectionUtils ?
  For example Person1(10, aaaa), Person2(10, bbbb), Person3(20, cccc)
  Result => Person1(10, aaaa), Person3(30, cccc)</p>
  
  <p>EDIT : </p>
  
  <p>This Solution work using Set and overrinding equals and hashcode:</p>
  
  <pre><code>List&lt;Person&gt; oldPerson = new ArrayList&lt;&gt;();
  //oldPerson.add ...
  
  Set&lt;Person&gt; newPerson = new HashSet&lt;&gt;(oldPerson);
  
  List&lt;Person&gt; theRightPerson = new ArrayList&lt;&gt;(newPerson);
  </code></pre>
  
  <p>The solution that i m looking for is something like :</p>
  
  <pre><code> List&lt;Person&gt; theRightPerson = (List&lt;Person&gt;) CollectionUtils.collect(oldPerson, new Transformer() {
  
          @Override
          public Object transform(Object input) {
              // TODO Auto-generated method stub
              return null;
          }
      })
  </code></pre>