/** * Sorts a given list of files by the 'last modified' time in the descending order. * * @param fileList * The given list of files. * @return The list of files sorted by the 'last modified' time in the descending order. */ public static SortedSet<File> sortFileListByTime(Collection<File> fileList) { TreeSet<File> set = new TreeSet<File>(new FileTimeComparator()); set.addAll(fileList); return set; }