com.versionone.utils

## Class Version

- java.lang.Object
- - com.versionone.utils.Version

- All Implemented Interfaces:
    Comparable<Version>

      public class Version
      extends Object
      implements Comparable<Version>

  Represents the API Version

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Version()` Create 1.0.0.0 version
    `Version(String value)` Parse a string to create version Expected format {major}.{minor}.{build}.{revision}

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Version other)`
    `boolean` | `equals(Object obj)` Determine if two versions are equal
    `int` | `getBuild()`
    `int` | `getMajor()`
    `int` | `getMinor()`
    `int` | `getRevision()`
    `String` | `toString()` Convert to string

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

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

- - ### Constructor Detail

    - #### Version

          public Version()

      Create 1.0.0.0 version

    - #### Version

          public Version(String value)

      Parse a string to create version Expected format {major}.{minor}.{build}.{revision}
      Parameters:
        `value` - - string to parse

  - ### Method Detail

    - #### getMajor

          public int getMajor()

    - #### getMinor

          public int getMinor()

    - #### getBuild

          public int getBuild()

    - #### getRevision

          public int getRevision()

    - #### equals

          public boolean equals(Object obj)

      Determine if two versions are equal
      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Convert to string
      Overrides:
        `toString` in class `Object`

    - #### compareTo

          public int compareTo(Version other)

      Specified by:
        `compareTo` in interface `Comparable<Version>`

Copyright © 2022 VersionOne, Inc.. All rights reserved.