// newest first static L sortFilesByDateDesc(Collection files) { ret sortedByComparator(files, new Comparator{ AutoMap dates = new AutoMap(lambda1 lastModified); // cache to ensure comparator is sane public int compare(File b, File a) { long x = dates.get(a), y = dates.get(b); return x < y ? -1 : x == y ? 0 : 1; } }); }