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 Details

    • majorVersion

      public final int majorVersion
      The major version number. Two versions are not compatible if they have different major version numbers. Major version number differences dominate.
    • minorVersion

      public final int minorVersion
      The minor version number.
    • revision

      public final int revision
      The 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 number
      minor - the minor number
      rev - the revision number
    • Version

      public Version​(String major, String minor, String rev)
      Create a version number.
      Parameters:
      major - the major number
      minor - the minor number
      rev - the revision number
    • Version

      public Version​(String threePartVersion)
      Create a version number.
      Parameters:
      threePartVersion - the version identifier, as X or X.Y or X.Y.Z.
      Throws:
      IllegalArgumentException - If the version string doesn't match one of the supported patterns.
  • Method Details