static L> pairsSortedByAComparator(final Comparator c, Collection> l) { ret sortedByComparator(l, new Comparator>() { public int compare(Pair a, Pair b) { ret c.compare(a.a, b.a); } }); }