public interface VersionType extends Comparable<VersionType>
Specifies a 2-byte version number, consisting of a major and minor component.
To make values of this type, use the following methods from the MAJ forge:
Forge.makeVersion(byte, byte);Forge.zeroVersion();toString():
Forge.parseVersion(String).TypeDefinitions.VersionType,
ProductVersion| Modifier and Type | Method and Description |
|---|---|
VersionType |
clone()
Create a cloned copy of this version value.
|
int |
compareTo(VersionType o)
Compare this version number to the given version number.
|
byte |
getMajor()
Returns the major component of the version number.
|
byte |
getMinor()
Returns the minor component of the version number.
|
void |
setMajor(byte major)
Sets the major component of the version number.
|
void |
setMinor(byte minor)
Sets the minor component of the version number.
|
String |
toString()
Formats the version number as a string representation.
|
@Int8 byte getMajor()
Returns the major component of the version number.
void setMajor(@Int8 byte major)
Sets the major component of the version number.
major - Major component of the version number.@Int8 byte getMinor()
Returns the minor component of the version number.
void setMinor(@Int8 byte minor)
Sets the minor component of the version number.
minor - Minor component of the version number.int compareTo(VersionType o) throws NullPointerException
Compare this version number to the given version number.
compareTo in interface Comparable<VersionType>o - Version number to compare with this one.-1 if this version number is less than the given one,
1 if this version is greater and 0 if the two version
numbers and equal.NullPointerException - The given value is null.VersionType clone()
Create a cloned copy of this version value.
String toString()
Formats the version number as a string representation. This format is:
.<minor>Note that "2.10" is a later version than "2.9".
To convert the representation created by this method back into a version type
value, use Forge.parseVersion(String).
toString in class ObjectForge.parseVersion(String)(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.