public class Version extends java.lang.Object implements java.lang.Comparable<Version>, java.io.Serializable
Constructor and Description |
---|
Version()
Creates a dev version
|
Version(int major,
int minor,
int rev,
int build) |
Version(int major,
int minor,
int rev,
int build,
int beta,
int rc) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version that)
Compares two Versions.
|
boolean |
equals(java.lang.Object obj) |
boolean |
exists() |
static Version |
fromXML(java.io.InputStream is)
Parses an XML document, looking for a Version element as given by getXML().
|
java.lang.String |
getBasicString()
Returns the version like 3.8.1 or 4.0.12-rc3
|
int |
getBeta() |
int |
getBuildNumber() |
int |
getMajor() |
int |
getMinor() |
int |
getRc() |
int |
getRevision() |
java.lang.String |
getVerboseString()
Returns the version like 3.8.1 (b1039)
|
java.lang.String |
getXML() |
int |
hashCode() |
boolean |
isDev() |
boolean |
isFutureVersion(Version that)
This differs from compareTo in that it only looks at major/minor/rev.
|
boolean |
isSnapshot() |
static Version |
parse(java.lang.String s)
Creates a version from a string of the format created by Version.toParseableString()
|
java.lang.String |
toParseableString()
Returns the version as a compact, parsable (non-XML) string that can be parsed with the
1-string constructor of
this class
|
java.lang.String |
toString() |
public Version()
public Version(int major, int minor, int rev, int build)
public Version(int major, int minor, int rev, int build, int beta, int rc)
public boolean isDev()
public boolean isSnapshot()
public boolean exists()
public int getBuildNumber()
public int getBeta()
public int getRc()
public java.lang.String toParseableString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getBasicString()
public java.lang.String getVerboseString()
public int getMajor()
public int getMinor()
public int getRevision()
public java.lang.String getXML()
public static Version fromXML(java.io.InputStream is) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
public static Version parse(java.lang.String s)
public boolean isFutureVersion(Version that)
public int compareTo(Version that)
compareTo
in interface java.lang.Comparable<Version>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object