Class Version

    • Field Detail

      • PATTERN

        public static final Pattern PATTERN
        The Regex pattern used to parse versions from strings
      • MAJOR

        public static final int MAJOR
        Default major version number. Defaults to 0
        See Also:
        Constant Field Values
      • MINOR

        public static final int MINOR
        Default minor version number. Defaults to 1
        See Also:
        Constant Field Values
      • PATCH

        public static final int PATCH
        Default patch version number. Defaults to 0
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static Version getInstance()
        Returns:
        Returns an instance of the version
      • getVersionString

        public String getVersionString()
        Returns the Version in string representation in the format: Major.Minor.Patch.
        Returns:
        The Version converted to a string
      • fromString

        public static Version fromString​(String versionString)
        Returns a new Version class from the given version string. Will throw an exception if it cannot convert.
        Parameters:
        versionString - The version string to convert
        Returns:
        The Version class created from the string
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object