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