Compare the last modified date/time of two files for order
(see {@link File#lastModified()}).
This comparator can be used to sort lists or arrays of files
by their last modified date/time.
Example of sorting a list of files using the
{@link #LASTMODIFIED_COMPARATOR} singleton instance:
List<File> list = ...
Collections.sort(list, LastModifiedFileComparator.LASTMODIFIED_COMPARATOR);
Example of doing a reverse sort of an array of files using the
{@link #LASTMODIFIED_REVERSE} singleton instance:
File[] array = ...
Arrays.sort(array, LastModifiedFileComparator.LASTMODIFIED_REVERSE);
|