ur_rna.Utilities

## Class Version

- java.lang.Object
- - ur_rna.Utilities.Version

- All Implemented Interfaces:
    java.lang.Comparable<Version>

      public class Version
      extends java.lang.Object
      implements java.lang.Comparable<Version>

  Implements semantic versioning for Java. Versions consist of 4 parts, of which only the first two are required, separated by dots (.) I.e.: Major.Minor.Revision.Build Examples: 3.2 (Major and Minor only) 3.1.0.3124 (All components)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `Build`
    `int` | `Major`
    `int` | `Minor`
    `int` | `Revision`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Version(int major, int minor)`
    `Version(int major, int minor, int revision)`
    `Version(int major, int minor, int revision, int build)`
    `Version(java.lang.String version)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Version o)`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `hashCode()`
    `boolean` | `isEmpty()`
    `static boolean` | `isVersionCompatible(java.lang.String minVersion, java.lang.String testVersion)`
    `static boolean` | `isVersionCompatible(Version minVersion, Version testVersion)`
    `java.lang.String` | `toString()`
    `static Version` | `tryParse(java.lang.String version)` Returns a Version object if the passed-in String argument represents a valid version string.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### Build

          public final int Build

    - #### Major

          public final int Major

    - #### Minor

          public final int Minor

    - #### Revision

          public final int Revision

  - ### Constructor Detail

    - #### Version

          public Version(int major,
                         int minor)

    - #### Version

          public Version(int major,
                         int minor,
                         int revision)

    - #### Version

          public Version(int major,
                         int minor,
                         int revision,
                         int build)

    - #### Version

          public Version(java.lang.String version)
                  throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`

  - ### Method Detail

    - #### compareTo

          public int compareTo(Version o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<Version>`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### isEmpty

          public boolean isEmpty()

    - #### isVersionCompatible

          public static boolean isVersionCompatible(java.lang.String minVersion,
                                                    java.lang.String testVersion)

    - #### isVersionCompatible

          public static boolean isVersionCompatible(Version minVersion,
                                                    Version testVersion)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### tryParse

          public static Version tryParse(java.lang.String version)

      Returns a Version object if the passed-in String argument represents a valid version string. Otherwise, returns null. This function prints an error to STDERR (via Throwable.printStackTrace) if the version cannot be parsed.
      Parameters:
        `version` - A string representing a version number, e.g. 2.3.1 A version string must have at least two parts (e.g. 6.0) but not more than four parts (e.g. 6.0.2.8888) The version string can be empty or null, in which case null is returned.
      Returns:
        Null if the version string is invalid, empty, or null. Otherwise returns a version object.