Class Version

    • Constructor Detail

      • Version

        @Contract(pure=true)
        public Version​(@NotNull
                       @NotNull CoreVersion coreVersion,
                       @NotNull
                       @NotNull PreRelease preRelease,
                       @NotNull
                       @NotNull BuildMetadata buildMetadata)
        Constructs a new version with the provided core, pre-release, and build data, values.
        Parameters:
        coreVersion - The core version.
        preRelease - The pre-release version.
        buildMetadata - The build data.
    • Method Detail

      • getMajor

        @NotNull
        @Contract(pure=true)
        public @NotNull java.math.BigInteger getMajor()
        The major version.
        Returns:
        The major version.
      • getMinor

        @NotNull
        @Contract(pure=true)
        public @NotNull java.math.BigInteger getMinor()
        The minor version.
        Returns:
        The minor version.
      • getPatch

        @NotNull
        @Contract(pure=true)
        public @NotNull java.math.BigInteger getPatch()
        The patch version.
        Returns:
        The patch version.
      • getCoreVersion

        @NotNull
        @Contract(pure=true)
        public @NotNull CoreVersion getCoreVersion()
        The core version.
        Returns:
        The core version.
      • getPreRelease

        @NotNull
        @Contract(pure=true)
        public @NotNull PreRelease getPreRelease()
        The pre-release version.
        Returns:
        The pre-release version.
      • getBuildMetadata

        @NotNull
        @Contract(pure=true)
        public @NotNull BuildMetadata getBuildMetadata()
        The build metadata.
        Returns:
        The build metadata.
      • toString

        @Contract(pure=true)
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        @Contract(value="null -> false",
                  pure=true)
        public boolean equals​(@Nullable
                              @Nullable java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(@NotNull
                             @NotNull Version o)
        Specified by:
        compareTo in interface java.lang.Comparable<Version>
      • getFormatted

        @NotNull
        public @NotNull java.lang.String getFormatted()
        Description copied from interface: Formattable
        This object represented as a short and human readable string.
        Specified by:
        getFormatted in interface Formattable
        Returns:
        This object as a readable string.