Class Version

    • Method Detail

      • from

        public static Version from​(String version)
        Returns a new version from the given version string.
        Parameters:
        version - the version string
        Returns:
        the version object
        Throws:
        IllegalArgumentException - if the version string is invalid
      • from

        public static Version from​(int major,
                                   int minor,
                                   int patch,
                                   String build)
        Returns a new version from the given parts.
        Parameters:
        major - the major version number
        minor - the minor version number
        patch - the patch version number
        build - the build version number
        Returns:
        the version object
      • major

        public int major()
        Returns the major version number.
        Returns:
        the major version number
      • minor

        public int minor()
        Returns the minor version number.
        Returns:
        the minor version number
      • patch

        public int patch()
        Returns the patch version number.
        Returns:
        the patch version number
      • build

        public String build()
        Returns the build version number.
        Returns:
        the build version number
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object