public final class JavaSpecVersion extends Object implements Comparable<JavaSpecVersion>
Constructor and Description |
---|
JavaSpecVersion(CharSequence source)
Create a new version from a simple version string (e.g.
|
JavaSpecVersion(int major,
int minor)
Create a new version information object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JavaSpecVersion that) |
boolean |
equals(Object o) |
int |
getMajor()
Obtain the major release number for this product.
|
int |
getMinor()
Obtain the minor 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() |
boolean |
isNewerThan(JavaSpecVersion otherVersion)
Convenience method for comparing versions
|
String |
toString() |
public JavaSpecVersion(int major, int minor)
major
- the major release number.minor
- the minor release number.public JavaSpecVersion(CharSequence source)
source
- the version stringpublic String getVersionString()
public int getMajor()
public int getMinor()
public boolean isNewerThan(JavaSpecVersion otherVersion)
otherVersion
- a verion to comapr againstpublic int compareTo(JavaSpecVersion that)
compareTo
in interface Comparable<JavaSpecVersion>
Copyright © 2003-2008 Jive Software.