Package fish.payara.micro.impl
Class DeploymentComparator
- java.lang.Object
-
- fish.payara.micro.impl.DeploymentComparator
-
- All Implemented Interfaces:
Comparator<File>
public class DeploymentComparator extends Object implements Comparator<File>
Compares deployment files by their file extension.
-
-
Constructor Summary
Constructors Constructor Description DeploymentComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(File f1, File f2)
Compare two files to see which should be deployed first based on file extension.List<String>
getFileExtensions()
Get the possible file extensions.-
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
-
-
-
-
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 interfaceComparator<File>
- Parameters:
f1
- the first file to comparef2
- 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.
-
-