|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.util.FileModDateComparator
public class FileModDateComparator
Compares two Files based on their modification date.
Field Summary | |
---|---|
static int |
NEWEST_FIRST
Sort by newest first. |
static int |
OLDEST_FIRST
Sort by oldest first. |
Constructor Summary | |
---|---|
FileModDateComparator()
Default constructor that sorts by newest first. |
|
FileModDateComparator(int sortOrder)
Constructor that allows setting the sort order by newest or oldest first. |
Method Summary | |
---|---|
int |
compare(Object o1,
Object o2)
Compares two Files for sorting by their modification date. |
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 |
Field Detail |
---|
public static final int NEWEST_FIRST
public static final int OLDEST_FIRST
Constructor Detail |
---|
public FileModDateComparator(int sortOrder)
sortOrder
- The order for sorting (NEWEST_FIRST or OLDEST_FIRST)NEWEST_FIRST
,
OLDEST_FIRST
public FileModDateComparator()
Method Detail |
---|
public int compare(Object o1, Object o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
compare
in interface Comparator
o1
- The first Object.o2
- The second Object.
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |