Class Version
java.lang.Object
uk.ac.manchester.spinnaker.messages.model.Version
- All Implemented Interfaces:
Comparable<Version>
public final class Version extends Object implements Comparable<Version>
A three-part semantic version description.
- Author:
- Donal Fellows
-
Field Summary
Fields Modifier and Type Field Description int
majorVersion
The major version number.int
minorVersion
The minor version number.int
revision
The revision number. -
Constructor Summary
-
Method Summary
-
Field Details
-
majorVersion
public final int majorVersionThe major version number. Two versions are not compatible if they have different major version numbers. Major version number differences dominate. -
minorVersion
public final int minorVersionThe minor version number. -
revision
public final int revisionThe revision number. Less important than the minor version number.
-
-
Constructor Details
-
Version
public Version(int major, int minor, int rev)Create a version number.- Parameters:
major
- the major numberminor
- the minor numberrev
- the revision number
-
Version
Create a version number.- Parameters:
major
- the major numberminor
- the minor numberrev
- the revision number
-
Version
Create a version number.- Parameters:
threePartVersion
- the version identifier, asX
orX.Y
orX.Y.Z
.- Throws:
IllegalArgumentException
- If the version string doesn't match one of the supported patterns.
-
-
Method Details