de.caff.util

## Class VersionChecker.Version

- java.lang.Object
- - de.caff.util.VersionChecker.Version

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

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

  Helper class for a simple version build from numbers separated by points. It is assumed that each part is just counted upwards, with the result that version `1.10` is newer than version `1.2`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Version(java.lang.String version)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(VersionChecker.Version version)` Compares this object with the specified object for order.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Version

          public Version(java.lang.String version)

      Constructor.
      Parameters:
        `version` - version number
      Throws:
        `java.lang.NumberFormatException` - if version contains anything else than digits and points (or underscores)

  - ### Method Detail

    - #### compareTo

          public int compareTo(@NotNull
                               VersionChecker.Version version)

      Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<VersionChecker.Version>`
      Parameters:
        `version` - the object to be compared.
      Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      Throws:
        `java.lang.ClassCastException` - if the specified object's type prevents it from being compared to this object.