public final class Version extends Object implements Comparable<Version>
This may be useful to implement version-specific features.
| Constructor and Description |
|---|
Version(String version)
Create a new version.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
atLeast(Version required)
Test whether or not this version is at least the required version.
|
int |
compareTo(Version o) |
String |
extra()
Get the extra.
|
int |
major()
Get the major version.
|
int |
minor()
Get the minor version.
|
int |
revision()
Get the revision.
|
String |
toString() |
String |
version()
Get the original version string.
|
public Version(String version)
version - version stringpublic String version()
public int major()
public int minor()
public int revision()
public String extra()
public boolean atLeast(Version required)
required - required versiontrue if this version is at least (equal to or
greater than) the required versionpublic int compareTo(Version o)
compareTo in interface Comparable<Version>Copyright © 2009-2012 Caprica Software Limited. All Rights Reserved.