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