code: public static <T> Iterator<T> toUnique(Iterator<T> self, Comparator<T> comparator) {
          return new UniqueIterator<T>(self, comparator);
      }
docs: Returns an iterator equivalent to this iterator with all duplicated
  items removed by using the supplied comparator.
  
  @param self an Iterator
  @param comparator a Comparator used to determine unique (equal) items
  If {@code null}, the Comparable natural ordering of the elements will be used.
  @return an Iterator with no duplicate items
  @since 2.4.0