Package org.forgerock.audit.util
Class LastModifiedTimeFileComparator
- java.lang.Object
-
- org.forgerock.audit.util.LastModifiedTimeFileComparator
-
- All Implemented Interfaces:
Comparator<File>
public class LastModifiedTimeFileComparator extends Object implements Comparator<File>
Compare two files based on file modification time.
-
-
Constructor Summary
Constructors Constructor Description LastModifiedTimeFileComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(File o1, File o2)
Compare two files based on file modification time.-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(File o1, File o2)
Compare two files based on file modification time.- Specified by:
compare
in interfaceComparator<File>
- Parameters:
o1
- The first file to be compared.o2
- The second file to be compared.- Returns:
- A negative value if the first file was the most recently modified, a positive value if the second was the most recently modified, or zero if there is no discernible difference between the last modify times.
-
-