public final class Version extends Object implements Comparable<Version>
Modifier and Type | Class and Description |
---|---|
static class |
Version.ReleaseStatus
A class to represent the release status of the server.
|
Constructor and Description |
---|
Version(CharSequence source)
Create a new version from a simple version string (e.g.
|
Version(int major,
int minor,
int micro,
Version.ReleaseStatus status,
int statusVersion)
Create a new version information object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version that) |
boolean |
equals(Object o) |
int |
getMajor()
Obtain the major release number for this product.
|
int |
getMicro()
Obtain the micro release number for this product.
|
int |
getMinor()
Obtain the minor release number for this product.
|
Version.ReleaseStatus |
getStatus()
Returns the release status of this product.
|
int |
getStatusVersion()
Obtain the status release number for this product.
|
String |
getVersionString()
Returns the version number of this instance of Openfire as a
String (ie major.minor.revision).
|
int |
hashCode() |
Version |
ignoringReleaseStatus() |
boolean |
isNewerThan(Version otherVersion)
Convenience method for comparing versions
|
String |
toString() |
public Version(int major, int minor, int micro, Version.ReleaseStatus status, int statusVersion)
major
- the major release number.minor
- the minor release number.micro
- the micro release number.status
- the status of the release.statusVersion
- status release number or -1 to indicate none.public Version(CharSequence source)
source
- the version stringpublic String getVersionString()
public Version.ReleaseStatus getStatus()
public int getMajor()
public int getMinor()
public int getMicro()
public int getStatusVersion()
public boolean isNewerThan(Version otherVersion)
otherVersion
- a version to compare againsttrue
if this version is newer, otherwise false
public int compareTo(Version that)
compareTo
in interface Comparable<Version>
public Version ignoringReleaseStatus()
Copyright © 2003–2020 Ignite Realtime. All rights reserved.