Class Version.BuildAwareOrder

java.lang.Object
com.github.zafarkhaja.semver.Version.BuildAwareOrder
All Implemented Interfaces:
Comparator<Version>
Enclosing class:
Version

private static class Version.BuildAwareOrder extends Object implements Comparator<Version>
A build-aware comparator.
  • Constructor Details

    • BuildAwareOrder

      private BuildAwareOrder()
  • Method Details

    • compare

      public int compare(Version v1, Version v2)
      Compares two Version 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 interface Comparator<Version>
      Returns: