Class DeploymentComparator

  • All Implemented Interfaces:
    Comparator<File>

    public class DeploymentComparator
    extends Object
    implements Comparator<File>
    Compares deployment files by their file extension.
    • Constructor Detail

      • DeploymentComparator

        public DeploymentComparator()
    • Method Detail

      • compare

        public int compare​(File f1,
                           File f2)
        Compare two files to see which should be deployed first based on file extension. Unknown extensions and null files are sorted to the back in that order.
        Specified by:
        compare in interface Comparator<File>
        Parameters:
        f1 - the first file to compare
        f2 - the second file to compare
        Returns:
        a negative integer, zero or a positive integer if the first file should be deployed before, at the same time as, or after the second file.
      • getFileExtensions

        public List<String> getFileExtensions()
        Get the possible file extensions.
        Returns:
        The possible file extensions