Package com.github.zafarkhaja.semver
Class Version.BuildAwareOrder
java.lang.Object
com.github.zafarkhaja.semver.Version.BuildAwareOrder
- All Implemented Interfaces:
Comparator<Version>
- Enclosing class:
Version
A build-aware 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
-
BuildAwareOrder
private BuildAwareOrder()
-
-
Method Details
-
compare
Compares twoVersion
instances taking into account their build metadata. When compared build metadata is divided into identifiers. The numeric identifiers are compared numerically, and the alphanumeric identifiers are compared in the ASCII sort order. If one of the compared versions has no defined build metadata, this version is considered to have a lower precedence than that of the other.- Specified by:
compare
in interfaceComparator<Version>
- Returns:
-