public class FileNameComparator extends Object implements Comparator<File>
Constructor and Description |
---|
FileNameComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(File f1,
File f2)
Returns 0 if
f1.getPath() equals f2.getPath() ;
1 if f1.getPath() is greater than f2.getPath() ;
and -1 if f1.getPath() is smaller than
f2.getPath() ; |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(File f1, File f2)
f1.getPath()
equals f2.getPath()
;
1 if f1.getPath()
is greater than f2.getPath()
;
and -1 if f1.getPath()
is smaller than
f2.getPath()
;compare
in interface Comparator<File>
f1
- File #1.f2
- File #2.f1
and f2
based on
path name.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.