// f: A -> Comparable
static L sortInPlaceByCalculatedField(L l, final F1 f) {
sort(l, new Comparator() {
public int compare(A a, A b) {
ret stdcompare(f.get(a), f.get(b));
}
});
ret l;
}
static L sortInPlaceByCalculatedField(L l, final IF1 f) {
sort(l, new Comparator() {
public int compare(A a, A b) {
ret stdcompare(f.get(a), f.get(b));
}
});
ret l;
}