Package org.apache.uima.pear.util
Class FileUtil.FileTimeComparator
- java.lang.Object
-
- org.apache.uima.pear.util.FileUtil.FileTimeComparator
-
- All Implemented Interfaces:
java.util.Comparator<java.io.File>
- Enclosing class:
- FileUtil
public static class FileUtil.FileTimeComparator extends java.lang.Object implements java.util.Comparator<java.io.File>TheFileTimeComparatorclass allows comparing 'last modified' time in 2 givenFileobjects.
-
-
Constructor Summary
Constructors Constructor Description FileTimeComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.io.File o1, java.io.File o2)booleanequals(java.lang.Object obj)
-
-
-
Method Detail
-
compare
public int compare(java.io.File o1, java.io.File o2) throws java.lang.ClassCastException- Specified by:
comparein interfacejava.util.Comparator<java.io.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:
java.lang.ClassCastException- if the arguments' types prevent them from being compared by thisComparator.
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Comparator<java.io.File>- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The reference object with which to compare.- Returns:
trueonly if the specified object is also aFileTimeComparator, and it imposes the same ordering as this comparator.
-
-