Class FileNameComparator

    • Constructor Detail

      • FileNameComparator

        public FileNameComparator()
    • Method Detail

      • compare

        public int compare​(File f1,
                           File f2)
        Returns 0 if f1.getPath() equals f2.getPath(); 1 if f1.getPath() is greater than f2.getPath(); and -1 if f1.getPath() is smaller than f2.getPath();
        Specified by:
        compare in interface Comparator<File>
        Parameters:
        f1 - File #1.
        f2 - File #2.
        Returns:
        the comparison of f1 and f2 based on path name.