xsul
Class XsulVersion
java.lang.Object
xsul.XsulVersion
- public class XsulVersion
- extends java.lang.Object
|
Method Summary |
static void |
exitIfRequiredVersionMissing(java.lang.String version)
|
static java.lang.String |
getImplementationVersion()
|
static java.lang.String |
getSpecVersion()
|
static java.lang.String |
getUserAgent()
|
static void |
main(java.lang.String[] args)
Print version when exxecuted from command line. |
static int[] |
parseVersion(java.lang.String version)
Parse verion string N.M[.K] into thre subcomponents (M=major,N=minor,K=increment)
that are returned in array with three elements. |
static void |
requireVersion(java.lang.String version)
Version mut be of form M.N[.K] where M is major version,
N is minor version and K is icrement. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPEC_VERSION
public static final java.lang.String SPEC_VERSION
- See Also:
- Constant Field Values
IMPL_VERSION
public static final java.lang.String IMPL_VERSION
- See Also:
- Constant Field Values
XsulVersion
public XsulVersion()
getUserAgent
public static java.lang.String getUserAgent()
getSpecVersion
public static java.lang.String getSpecVersion()
getImplementationVersion
public static java.lang.String getImplementationVersion()
main
public static void main(java.lang.String[] args)
- Print version when exxecuted from command line.
exitIfRequiredVersionMissing
public static void exitIfRequiredVersionMissing(java.lang.String version)
requireVersion
public static void requireVersion(java.lang.String version)
throws java.lang.IllegalStateException
- Version mut be of form M.N[.K] where M is major version,
N is minor version and K is icrement.
This method returns true if current major version is the same
and minor is bigger or equal to current minor verion.
If provided major and minor verisons are equals to current version
then increment is also checked and check is passed when increment
is bigger or equal to current increment version.
- Throws:
java.lang.IllegalStateException
parseVersion
public static int[] parseVersion(java.lang.String version)
throws java.lang.NumberFormatException
- Parse verion string N.M[.K] into thre subcomponents (M=major,N=minor,K=increment)
that are returned in array with three elements.
M and N must be non negative, and K if present must be positive integer.
Increment K is optional and if not present in verion strig it is returned as zero.
- Throws:
java.lang.NumberFormatException
IU Extreme! Lab (http://www.extreme.indiana.edu)