code: public static <T> List<T> unique(List<T> self, Comparator<T> comparator) {
          return (List<T>) unique((Collection<T>) self, true, comparator);
      }
docs: Remove all duplicates from a given List.
  Works on the original object (and also returns it).
  The order of members in the List are compared by the given Comparator.
  For each duplicate, the first member which is returned
  by the given List's iterator is retained, but all other ones are removed.
  The given List's original order is preserved.
  <p>
  <pre class="groovyTestCase">
  class Person {
  def fname, lname
  String toString() {
  return fname + " " + lname
  }
  }
  
  class PersonComparator implements Comparator {
  int compare(Object o1, Object o2) {
  Person p1 = (Person) o1
  Person p2 = (Person) o2
  if (p1.lname != p2.lname)
  return p1.lname.compareTo(p2.lname)
  else
  return p1.fname.compareTo(p2.fname)
  }
  
  boolean equals(Object obj) {
  return this.equals(obj)
  }
  }
  
  Person a = new Person(fname:"John", lname:"Taylor")
  Person b = new Person(fname:"Clark", lname:"Taylor")
  Person c = new Person(fname:"Tom", lname:"Cruz")
  Person d = new Person(fname:"Clark", lname:"Taylor")
  
  def list = [a, b, c, d]
  List list2 = list.unique(new PersonComparator())
  assert( list2 == list {@code &&} list == [a, b, c] )
  </pre>
  
  @param self       a List
  @param comparator a Comparator
  @return self      the now modified List without duplicates
  @see #unique(java.util.Collection, boolean, java.util.Comparator)
  @since 2.4.0