final class ReverseFileComparator extends AbstractFileComparator implements Serializable
File objects using the delegate Comparator.
Serialization is deprecated and will be removed in 3.0.
| Constructor and Description |
|---|
ReverseFileComparator(Comparator<File> delegate)
Constructs an instance with the specified delegate
Comparator. |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(File file1,
File file2)
Compares using the delegate Comparator, reversing the result.
|
String |
toString()
Returns the String representation of this file comparator.
|
sort, sortclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongReverseFileComparator(Comparator<File> delegate)
Comparator.delegate - The comparator to delegate to.public int compare(File file1, File file2)
compare in interface Comparator<File>file1 - The first file to compare.file2 - The second file to compare.Comparator.compare(Object, Object) reversing the value,
positive becomes negative and vice versa.public String toString()
toString in class AbstractFileComparator