code: public static <T> SerializableComparator<Pair<T, ?>> byFirstOfPair(Comparator<? super T> comparator)
      {
          return new ByFirstOfPairComparator<T>(comparator);
      }
docs: Creates a comparator for pairs by using an existing comparator that only compares the first element of the pair
  
  @param comparator original comparator that compares the first element of the pair
  @return A comparator that compares pairs only by their first element