code: @Override
    public int compareTo(MetadataVersion other) {
      if (other == MetadataVersion.NULL) {
        /**
         * Pre-release versions have a lower precedence than the associated normal version. (SemVer
         * p.9)
         */
        return -1;
      }
      int result = compareIdentifierArrays(other.idents);
      if (result == 0) {
        /**
         * A larger set of pre-release fields has a higher precedence than a smaller set, if all of
         * the preceding identifiers are equal. (SemVer p.11)
         */
        result = idents.length - other.idents.length;
      }
      return result;
    }
docs: {@inheritDoc}.