Class Version

java.lang.Object
io.atomix.utils.Version
All Implemented Interfaces:
Comparable<Version>

public final class Version extends Object implements Comparable<Version>
Atomix software version.
  • Method Details

    • from

      public static Version from(String version)
      Returns a new version from the given version string.
      Parameters:
      version - the version string
      Returns:
      the version object
      Throws:
      IllegalArgumentException - if the version string is invalid
    • from

      public static Version from(int major, int minor, int patch, String build)
      Returns a new version from the given parts.
      Parameters:
      major - the major version number
      minor - the minor version number
      patch - the patch version number
      build - the build version number
      Returns:
      the version object
    • build

      public String build()
      Returns the build version number.
      Returns:
      the build version number
    • compareTo

      public int compareTo(Version that)
      Specified by:
      compareTo in interface Comparable<Version>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object