static Comparator fieldComparator(fS field) { ret new Comparator() { public int compare(A a, A b) { ret cmp(getOpt(a, field), getOpt(b, field)); } }; }