HiRISE

HiRISE.HiPlan.IO
Class Last_Modified_Comparator

java.lang.Object
  extended by HiRISE.HiPlan.IO.Last_Modified_Comparator
All Implemented Interfaces:
Comparator<File>

public class Last_Modified_Comparator
extends Object
implements Comparator<File>

A file comparator that compares the last-modified time of two files.

Note: Because only one component of a File object is compared, this comparator imposes orderings that are inconsistent with equals.

Version:
1.2
Author:
Christian Schaller - UA/PIRL

Field Summary
static String ID
          Class identification name with source code version and date.
 
Constructor Summary
Last_Modified_Comparator()
           
 
Method Summary
 int compare(File f1, File f2)
          Compares its two arguments for order.
 
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
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values
Constructor Detail

Last_Modified_Comparator

public Last_Modified_Comparator()
Method Detail

compare

public int compare(File f1,
                   File f2)
Compares its two arguments for order. Order is determined based solely on the files' last-modified times.

Note: Because only one component of a File object is compared, this comparator imposes orderings that are inconsistent with equals.

Specified by:
compare in interface Comparator<File>
Parameters:
f1 - the first file to be compared.
f2 - the second file to be compared.
Returns:
a negative integer, zero, or a positive integer as the first argument's last-modified time is less than, equal to, or greater than the second's.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona