public final class Version extends Object implements Comparable<Version>
Modifier and Type | Field and Description |
---|---|
static Version |
CURRENT
The current version of this library.
|
static Version |
VERSION_1_0_4
the version 1.0.4
|
static Version |
VERSION_1_0_5
the version 1.0.5
|
static Version |
VERSION_1_0_6
the version 1.0.6
|
static Version |
VERSION_1_0_7
the version 1.0.7
|
static Version |
VERSION_1_0_8
the version 1.0.8
|
static Version |
VERSION_1_0_8a
the version 1.0.8 (since preview 4)
|
static Version |
VERSION_1_1_0
the version 1.1.0
|
static Version |
VERSION_1_1_0a
the version 1.1.0 (since preview 5)
|
static Version |
VERSION_1_1_1
the version 1.1.1
|
static Version |
VERSION_1_1_1a
the version 1.1.1 (since preview 5c)
|
static Version |
VERSION_1_1_2
version 1.1.2
|
Constructor and Description |
---|
Version(int major,
int minor,
int mikro,
String add)
Creates a new version
|
Modifier and Type | Method and Description |
---|---|
void |
checkCurrent()
Checks whether this version is greater than the current version and
throws an exception if so.
|
int |
compareTo(Version o) |
boolean |
equals(Object obj) |
String |
getAdd()
Gets the additional information
|
int |
getMajor()
Gets the major number.
|
int |
getMikro()
Gets the mikro number
|
int |
getMinor()
Gets the minor number
|
int |
hashCode() |
static Version |
read(DataInputStream in)
Reads a version that was stored earlier.
|
String |
toString() |
static void |
write(DataOutputStream out,
Version version)
Writes the contents of a version.
|
public static final Version VERSION_1_0_4
public static final Version VERSION_1_0_5
public static final Version VERSION_1_0_6
public static final Version VERSION_1_0_7
public static final Version VERSION_1_0_8
public static final Version VERSION_1_0_8a
public static final Version VERSION_1_1_0
public static final Version VERSION_1_1_0a
public static final Version VERSION_1_1_1
public static final Version VERSION_1_1_1a
public static final Version VERSION_1_1_2
public static final Version CURRENT
public Version(int major, int minor, int mikro, String add)
major
- the major versionminor
- the minor versionmikro
- the mikro versionadd
- additional comment, null
will be replaced by the empty stringpublic static void write(DataOutputStream out, Version version) throws IOException
out
- the stream to write intoversion
- the version to writeIOException
- if an error occurspublic static Version read(DataInputStream in) throws IOException
in
- the stream to read fromIOException
- if an error occurs or the format is unknownpublic void checkCurrent() throws IOException
IOException
- thrown if the current version is smaller than this
.public String getAdd()
public int getMajor()
public int getMikro()
public int getMinor()
public int compareTo(Version o)
compareTo
in interface Comparable<Version>