|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.runtime.Version
public class Version
A version consists of three fields, denoting the major version, the minor version, and the update version. Example: 3.1.2.
Field Summary | |
---|---|
static Version |
MAX
|
static Version |
MIN
|
static Version |
ZERO
|
Constructor Summary | |
---|---|
Version(int major,
int minor,
int update)
Creates a new version object given the major, minor and update version numbers. |
Method Summary | |
---|---|
int |
compareTo(Version v)
|
boolean |
equals(Object object)
|
int |
getMajorVersion()
Gets the major version field. |
int |
getMinorVersion()
Gets the minor version field. |
int |
getUpdateVersion()
Gets the update version field. |
int |
hashCode()
|
boolean |
isEqualTo(Version version)
Tests if the current version is equal to the given one. |
boolean |
isGreaterOrEqualThan(Version version)
Tests if the current version is greater or equal to the given one. |
boolean |
isGreaterThan(Version version)
Tests if the current version is greater than the given one. |
static Version |
parseString(String version)
Creates a new version object given a string representation of the version. |
String |
toString()
Gets the string representation of this version. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Version ZERO
public static final Version MIN
public static final Version MAX
Constructor Detail |
---|
public Version(int major, int minor, int update)
major
- the major versionminor
- the minor versionupdate
- the update versionMethod Detail |
---|
public static Version parseString(String version)
version
- the version string
NumberFormatException
- if the version string is invalidpublic boolean isGreaterThan(Version version)
version
- the version to compare to the current one
public boolean isGreaterOrEqualThan(Version version)
version
- the version to compare to the current one
public boolean isEqualTo(Version version)
version
- the version to compare to the current one
public int getMinorVersion()
public int getMajorVersion()
public int getUpdateVersion()
public String toString()
The string representation can be used in parseString(String)
to create a version object.
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object object)
equals
in class Object
public int compareTo(Version v)
compareTo
in interface Comparable<Version>
|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |