@Override
  public int compareTo(VersionNumber other) {
    if (major != other.major) return major - other.major;
    if (minor != other.minor) return minor - other.minor;
    if (micro != other.micro) return micro - other.micro;
    int qualComp = ObjectUtil.compare(getQualifier(), other.getQualifier());
    if (qualComp != 0) return qualComp;
    return isSnapshot == other.isSnapshot
      ? 0
      : isSnapshot
      ? -1
      : 1;
  }
A version number with format major.minor.micro-qualifier.
spock-core/src/main/java/org/spockframework/util/VersionNumber.java