net.sf.fstreem
Class FileComparator
java.lang.Object
net.sf.fstreem.FileComparator
- All Implemented Interfaces:
- java.util.Comparator
- public class FileComparator
- extends java.lang.Object
- implements java.util.Comparator
Compares to File
objects together, for collation (sorting)
purposes.
Instances of this class sort null, then folders then files, keeping
everything in CASE_INSENSITIVE_ORDER
.
Field Summary |
static java.util.Comparator |
INSTANCE
|
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
INSTANCE
public static final java.util.Comparator INSTANCE
FileComparator
public FileComparator()
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare
in interface java.util.Comparator