Package org.apache.uima.pear.util
Class FileUtil.FileTimeComparator
java.lang.Object
org.apache.uima.pear.util.FileUtil.FileTimeComparator
- All Implemented Interfaces:
Comparator<File>
- Enclosing class:
- FileUtil
The
FileTimeComparator
class allows comparing 'last modified' time in 2 given
File
objects.-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
FileTimeComparator
public FileTimeComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<File>
- Returns:
- A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
- Throws:
ClassCastException
- if the arguments' types prevent them from being compared by thisComparator
.
-
equals
- Specified by:
equals
in interfaceComparator<File>
- Overrides:
equals
in classObject
- Parameters:
obj
- The reference object with which to compare.- Returns:
true
only if the specified object is also aFileTimeComparator
, and it imposes the same ordering as this comparator.
-