code: static <T, S extends Sequence> Comparator<Cluster<T>>
      getComparatorOfClusters(final Comparator<T> objectComparator, final SequenceExtractor<T, S> extractor) {
          return new Comparator<Cluster<T>>() {
              @Override
              public int compare(Cluster<T> o1, Cluster<T> o2) {
                  int i = objectComparator.compare(o2.head, o1.head); // Reverse comparison
                  return i == 0 ?
                          extractor.getSequence(o2.head).compareTo(extractor.getSequence(o1.head))
                          : i;
              }
          };
      }
docs: First REVERSE compare cluster heads (bigger objects comes first), if equal, REVERSE compare by head sequence.