public class FileComparator extends Object implements Comparator<File>, Serializable
File name and type comparator.
This comparator is used by some file-related components by default.| Modifier and Type | Field and Description |
|---|---|
protected FileNameComparator |
fileNameComparator
File name comparator. |
| Constructor and Description |
|---|
FileComparator()
Constructs new
FileComparator. |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(File file1,
File file2)
Compares two files by their names and type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongprotected final FileNameComparator fileNameComparator
File name comparator.public FileComparator()
FileComparator.public int compare(File file1, File file2)
compare in interface Comparator<File>file1 - first file to be comparedfile2 - second file to be comparedCopyright © 2020. All rights reserved.