Class RecFileComparator

java.lang.Object
com.nt.udc.ei.transport.RecFileComparator
All Implemented Interfaces:
FileComparator, Comparator

public class RecFileComparator extends Object implements FileComparator
  • Constructor Details

    • RecFileComparator

      public RecFileComparator()
  • Method Details

    • compareFiles

      public int compareFiles(File file1, File file2) throws FileParseException
      Compares 2 NAR files, based on their File names.
      Specified by:
      compareFiles in interface FileComparator
      Parameters:
      file1 - First file name
      file2 - Second file name
      Returns:
      -1, if file1 invalid input: '<' file2 0 , if file1 == file2 1 , if file1 > file2
      Throws:
      FileParseException - if the file name is improperly formatted
    • compare

      public int compare(Object obj1, Object obj2)
      Compares 2 NAR file names, as described in compareFiles(x,y). If the FileParseException is caught, this method will return 0 to ensure no sorting is done.
      Specified by:
      compare in interface Comparator