java.lang.Object
org.wildfly.plugin.tools.VersionComparator
- All Implemented Interfaces:
Comparator<String>
Compares two versions.
- Author:
- James R. Perkins
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
VersionComparator
public VersionComparator()
-
-
Method Details
-
compareVersion
Compares the first version against the second version.- Parameters:
v1- first versionv2- second version- Returns:
0if the versions are equal,-1if version first version is less than the second version or1if the first version is greater than the second version- See Also:
-
compare
- Specified by:
comparein interfaceComparator<String>
-