appli.diff
Class FileCompar

java.lang.Object
  extended byappli.diff.FileCompar
All Implemented Interfaces:
java.util.Comparator

class FileCompar
extends java.lang.Object
implements java.util.Comparator

Local class used as Comparator for file names, excluding a common root part for the two filenames

Version:
1.0 Dec 2003
Author:
Marc Wenger/CDS

Field Summary
(package private)  int lenroot
           
(package private)  java.lang.String root
           
 
Constructor Summary
FileCompar(java.lang.String root)
          Constructor
 
Method Summary
 int compare(java.lang.Object f1, java.lang.Object f2)
          Compare method.
 
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

root

java.lang.String root

lenroot

int lenroot
Constructor Detail

FileCompar

public FileCompar(java.lang.String root)
Constructor

Parameters:
root - the root part of the filenames, excluded from the comparison
Method Detail

compare

public int compare(java.lang.Object f1,
                   java.lang.Object f2)
Compare method. The calback method used by the sort

Specified by:
compare in interface java.util.Comparator
Parameters:
f1 - first filename in the comparison
f2 - second filename in the comparison
Returns:
value <0, =0, >0 depending on the comparison