org.norther.tammi.acorn.io
Class FileDateComparator
java.lang.Object
org.norther.tammi.acorn.io.FileDateComparator
- All Implemented Interfaces:
- Serializable, Comparator
public class FileDateComparator
- extends Object
- implements Comparator, Serializable
A comparator for file dates.
- Author:
- Ilkka Priha
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDateComparator
public FileDateComparator()
- Constructs a new comparator.
compare
public int compare(Object file1,
Object file2)
- Compares two file dates.
- Specified by:
compare in interface Comparator
- Parameters:
file1 - the first file to be compared.file2 - the second file to be compared.
- Returns:
- -1, 0 or 1 based on comparison.
- Throws:
NullPointerException - for null files.
ClassCastException - if parameters are not files.
compare
protected int compare(File file1,
File file2)
- Compares two file dates in ascending order.
- Parameters:
file1 - the first file to be compared.file2 - the second file to be compared.
- Returns:
- -1, 0 or 1 based on comparison.
- Throws:
NullPointerException - for null files.
Copyright © 2004 The Norther Organization. All rights reserved.