Class Version
java.lang.Object
com.atlassian.jira.health.checks.database.Version
- All Implemented Interfaces:
Comparable<Version>
Represents a database application version
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Version
public Version(int major, int minor, int micro)
-
-
Method Details
-
of
Takes a String and converts it into a version. Verifies against regular expression to determine if it's a valid version number or not. For example, some valid Strings, and their converted versions: "1" (1.0.0), "1.2" (1.2.0), "1.20.3" (1.20.3), "1.2-SNAPSHOT" (1.2), "1.2.RC1" (1.2).- Parameters:
version- The version as a String, e.g.: "1.2".- Returns:
- The version converted as a String, replacing 0 where blank. E.g.: "1.2" becomes 1.2.0.
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getMicro
public int getMicro() -
getMajorAndMinor
-
compareTo
- Specified by:
compareToin interfaceComparable<Version>
-
equals
-
hashCode
public int hashCode() -
toString
-