org.mmbase.util
Class FileCompare

java.lang.Object
  extended by org.mmbase.util.FileCompare
All Implemented Interfaces:
CompareInterface

public class FileCompare
extends Object
implements CompareInterface

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

Version:
$Id: FileCompare.java 35335 2009-05-21 08:14:41Z michiel $
Author:
David V van Zeventer
See Also:
SortedVector, CompareInterface
To Do:
Should be named FileLastModifiedComparator and implement java.util.Comparator
Application:
SCAN or Devices

Constructor Summary
FileCompare()
           
 
Method Summary
 int compare(Object thisone, 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(Object thisone,
                   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 2.0-SNAPSHOT - null