Package ca.corbett.extras.io
Class FilePathDepthComparator
java.lang.Object
ca.corbett.extras.io.FilePathDepthComparator
- All Implemented Interfaces:
Comparator<File>
Deprecated.
Use FileNameComparator
A Comparator implementation for lists of File objects that will sort them according to
depth, from shallowest to deepest. Dev note: I pulled this from FileSystemUtil's
findSubdirectories() method because it adds a fair bit of performance overhead during
large recursive searches, and also because it turns out I like the results from
FileNameComparator better anyway. Leaving this here in case it's ever useful.
- Since:
- 2022-05-10
- Author:
- scorbo2
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
FilePathDepthComparator
public FilePathDepthComparator()Deprecated.
-
-
Method Details
-
compare
Deprecated.- Specified by:
comparein interfaceComparator<File>
-