org.mmbase.util
Class FileCompare

java.lang.Object
  |
  +--org.mmbase.util.FileCompare
All Implemented Interfaces:
CompareInterface

public class FileCompare
extends java.lang.Object
implements CompareInterface

Class to compare two Files on their modification time, used by SortedVector.

Version:
12 November 1998
Author:
David V van Zeventer
See Also:
SortedVector, CompareInterface

Constructor Summary
FileCompare()
           
 
Method Summary
 int compare(java.lang.Object thisone, java.lang.Object other)
          Make the comparison.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCompare

public FileCompare()
Method Detail

compare

public int compare(java.lang.Object thisone,
                   java.lang.Object other)
Make the comparison. The result is a negative value if the time of the first file is 'smaller' than the second, a positive value if it is 'larger', and 0 if both times are 'equal'.
Specified by:
compare in interface CompareInterface
Parameters:
thisOne - the first object to compare. should be a File.
other - the second object to compare. should be a File.
Returns:
the result of the comparison


MMBase 2001