Package com.github.zafarkhaja.semver
Class Version.BuildAwareOrder
- java.lang.Object
-
- com.github.zafarkhaja.semver.Version.BuildAwareOrder
-
-
Constructor Summary
Constructors Modifier Constructor Description private
BuildAwareOrder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Version v1, Version v2)
Compares twoVersion
instances taking into account their build metadata.
-
-
-
Method Detail
-
compare
public int compare(Version v1, Version v2)
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 interfacejava.util.Comparator<Version>
- Returns:
-
-