// f: A -> Comparable
static L sortedByCalculatedField(Iterable c, O f) {
ret sortByCalculatedField(c, f);
}
static L sortedByCalculatedField(O f, Iterable c) {
ret sortedByCalculatedField(c, f);
}
static L lambdaMapLike sortedByCalculatedField(IF1 f, Iterable c) {
ret sortedByCalculatedField(c, f);
}
static L sortedByCalculatedField(Iterable c, IF1 f) {
L l = cloneList(c);
sort(l, new Comparator() {
public int compare(A a, A b) {
ret stdcompare(f.get(a), f.get(b));
}
});
ret l;
}