| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version object) |
boolean |
equals(java.lang.Object object) |
int |
getMajor() |
int |
getMinor() |
int |
hashCode()
Returns a hash code value for the object.
|
static Version |
parseVersion(java.lang.String version)
Creates a
Version instance by parsing the given version string. |
java.lang.String |
toString() |
public int getMajor()
public int getMinor()
public static Version parseVersion(java.lang.String version) throws java.lang.IllegalArgumentException, java.lang.NumberFormatException
Version instance by parsing the given version string. The format is defined
as:
version ::= major('.'minor)?
major ::= digit+
minor ::= digit+
digit ::= [0-9]
version - The string represenation of a version.Version instance, or 0.0 version on error.java.lang.IllegalArgumentException - When the given format is invalid.java.lang.NumberFormatException - When the major or minor component is not an integer.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Object