public interface ProductVersion
Specifies the version number of an application, represented with four release levels and its product release type. The four release levels specify the major, minor, tertiary and patch level of a product.
To make values of this type, use the following methods from the MAJ forge:
Forge.makeProductVersion(short, short, short, short, ProductReleaseType);Forge.zeroProductVersion();
toString():
Forge.parseProductVersion(String).TypeDefinitions.ProductVersionType,
VersionType| Modifier and Type | Method and Description |
|---|---|
ProductVersion |
clone()
Create a cloned copy of this product version.
|
ProductReleaseType |
getBuildType()
Returns the associated application's product release type, for example final, debug, beta etc..
|
short |
getMajor()
Returns the major component of the version number.
|
short |
getMinor()
Returns the minor component of the version number.
|
short |
getPatchLevel()
Returns the patch level component of the version number.
|
short |
getTertiary()
Returns the tertiary component of the version number.
|
void |
setBuildType(ProductReleaseType type)
Sets the associated application's product release type, for example final, debug, beta etc..
|
void |
setMajor(short major)
Sets the major component of this version number.
|
void |
setMinor(short minor)
Sets the minor component of the version number.
|
void |
setPatchLevel(short patchLevel)
Sets the patch level component of the version number.
|
void |
setTertiary(short tertiary)
Sets the tertiary component of the version number.
|
String |
toString()
Formats a pseudo-XML representation of the current value of this product version.
|
@UInt16 short getMajor()
Returns the major component of the version number.
void setMajor(@UInt16 short major) throws IllegalArgumentException
Sets the major component of this version number.
major - Major component of the version number.IllegalArgumentException - Cannot set the major component of this product version
to a negative value.@UInt16 short getMinor()
Returns the minor component of the version number.
void setMinor(@UInt16 short minor) throws IllegalArgumentException
Sets the minor component of the version number.
minor - Minor component of the version number.IllegalArgumentException - Cannot set the minor component of this product version
to a negative value.@UInt16 short getTertiary()
Returns the tertiary component of the version number.
void setTertiary(@UInt16 short tertiary) throws IllegalArgumentException
Sets the tertiary component of the version number.
tertiary - Tertiary component of the version number.IllegalArgumentException - Cannot set the tertiary component of this product version
to a negative value.@UInt16 short getPatchLevel()
Returns the patch level component of the version number.
void setPatchLevel(@UInt16 short patchLevel) throws IllegalArgumentException
Sets the patch level component of the version number.
patchLevel - Patch level component of the version number.IllegalArgumentException - Cannot set the patch level component of this product version
to a negative value.ProductReleaseType getBuildType()
Returns the associated application's product release type, for example final, debug, beta etc..
void setBuildType(ProductReleaseType type) throws NullPointerException
Sets the associated application's product release type, for example final, debug, beta etc..
type - Associated application's release type.NullPointerException - The given product release type is null.ProductVersion clone()
Create a cloned copy of this product version.
String toString()
Formats a pseudo-XML representation of the current value of this product version. The value will be formatted in a similar way to the following example:
<ProductVersion>
<Major>0</Major>
<Minor>3</Minor>
<Tertiary>1</Tertiary>
<PatchLevel>2</PatchLevel>
<BuildType>VersionDebug</BuildType>
</ProductVersion>
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.