org.opends.server.loggers
Class FileComparator

java.lang.Object
  extended by org.opends.server.loggers.FileComparator
All Implemented Interfaces:
java.util.Comparator<java.io.File>

public class FileComparator
extends java.lang.Object
implements java.util.Comparator<java.io.File>

This class implements a comparator that can compare two files based on the time that they were last modified.


Constructor Summary
FileComparator()
           
 
Method Summary
 int compare(java.io.File o1, java.io.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
 

Constructor Detail

FileComparator

public FileComparator()
Method Detail

compare

public int compare(java.io.File o1,
                   java.io.File o2)
Compare two files based on file modification time.

Specified by:
compare in interface java.util.Comparator<java.io.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.