org.apache.uima.pear.util
Class FileUtil.FileTimeComparator

java.lang.Object
  extended by 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>

The FileTimeComparator class allows comparing 'last modified' time in 2 given File objects.


Constructor Summary
FileUtil.FileTimeComparator()
           
 
Method Summary
 int compare(java.io.File o1, java.io.File o2)
           
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil.FileTimeComparator

public FileUtil.FileTimeComparator()
Method Detail

compare

public int compare(java.io.File o1,
                   java.io.File o2)
            throws java.lang.ClassCastException
Specified by:
compare in interface java.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 this Comparator.

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Comparator<java.io.File>
Overrides:
equals in class java.lang.Object
Parameters:
obj - The reference object with which to compare.
Returns:
true only if the specified object is also a FileTimeComparator, and it imposes the same ordering as this comparator.


Copyright © 2013. All Rights Reserved.