Package com.nt.udc.ei.transport
Class RecFileComparator
java.lang.Object
com.nt.udc.ei.transport.RecFileComparator
- All Implemented Interfaces:
FileComparator
,Comparator
-
Constructor Summary
Constructors -
Method Summary
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
RecFileComparator
public RecFileComparator()
-
-
Method Details
-
compareFiles
Compares 2 NAR files, based on their File names.- Specified by:
compareFiles
in interfaceFileComparator
- Parameters:
file1
- First file namefile2
- 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
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 interfaceComparator
-