public class Version extends Object implements Comparable, RevisionHandler
Modifier and Type | Field and Description |
---|---|
static int |
MAJOR
the major version
|
static int |
MINOR
the minor version
|
static int |
REVISION
the revision
|
static boolean |
SNAPSHOT
True if snapshot
|
static String |
VERSION
the complete version
|
static String |
VERSION_FILE
the version file
|
Constructor and Description |
---|
Version() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
checks the version of this class against the given version-string
|
boolean |
equals(Object o)
whether the given version string is equal to this version
|
String |
getRevision()
Returns the revision string.
|
boolean |
isNewer(Object o)
checks whether this version is newer than the one from the given version
string
|
boolean |
isOlder(Object o)
checks whether this version is older than the one from the given version
string
|
static void |
main(String[] args)
only for testing
|
String |
toString()
returns the current version as string
|
public static final String VERSION_FILE
public static int MAJOR
public static int MINOR
public static int REVISION
public static boolean SNAPSHOT
public static String VERSION
public int compareTo(Object o)
compareTo
in interface Comparable
o
- the version-string to compare withpublic boolean equals(Object o)
public boolean isOlder(Object o)
o
- the version-string to compare withpublic boolean isNewer(Object o)
o
- the version-string to compare withpublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
public static void main(String[] args)
args
- the commandline arguments - ignoredCopyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.