Class KubernetesVersionFactory.KubernetesVersion

    • Method Detail

      • getMajor

        public Integer getMajor()
      • isStable

        public boolean isStable()
      • compareTo

        public int compareTo​(KubernetesVersionFactory.Version other)
        Compares this version to another version and returns whether this version has a higher, equal or lower priority than the version that it is being compared to. The kubernetes specs v1.17 at Version Priority state the following:
        • Entries that follow Kubernetes version patterns are sorted before those that do not.
        • For entries that follow Kubernetes version patterns, the numeric portions of the version string is sorted largest to smallest.
        • If the strings beta or alpha follow the first numeric portion, they sorted in that order, after the equivalent string without the beta or alpha suffix (which is presumed to be the GA version).
        • If another number follows the beta, or alpha, those numbers are also sorted from largest to smallest.
        • Strings that don’t fit the above format are sorted alphabetically and the numeric portions are not treated specially. Notice that in the example below, foo1 is sorted above foo10. This is different from the sorting of the numeric portion of entries that do follow the Kubernetes version patterns.
        Parameters:
        other - the version to compare this version to
        Returns:
        -1 if this version has a lower, 1 if it has a higher or 0 if the priorities are equal