Class Version

java.lang.Object
org.apache.drill.common.Version
All Implemented Interfaces:
Comparable<Version>

public final class Version extends Object implements Comparable<Version>
Encapsulates version information and provides ordering
  • Constructor Details

    • Version

      public Version(String version, int major, int minor, int patch, int buildNumber, String qualifier)
  • Method Details

    • getVersion

      public String getVersion()
      Get the version string
      Returns:
      the version number as x.y.z
    • getMajorVersion

      public int getMajorVersion()
      Get the major version
      Returns:
      x if assuming the version number is x.y.z
    • getMinorVersion

      public int getMinorVersion()
      Get the minor version
      Returns:
      y if assuming the version number is x.y.z
    • getPatchVersion

      public int getPatchVersion()
      Get the patch version
      Returns:
      z if assuming the version number is x.y.z(-suffix)
    • getBuildNumber

      public int getBuildNumber()
      Get the build number
      Returns:
      b if assuming the version number is x.y.z(.b)(-suffix)
    • getQualifier

      public String getQualifier()
      Get the version qualifier
      Returns:
      b if assuming the version number is x.y.z(.b)(-suffix)
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Version o)
      Specified by:
      compareTo in interface Comparable<Version>