public static Comparator comparatorByName() { return new Comparator() { public int compare(Object o1, Object o2) { . . . } }; }