Class CoreVersion

  • All Implemented Interfaces:
    Formattable, java.lang.Comparable<CoreVersion>

    public final class CoreVersion
    extends java.lang.Object
    implements java.lang.Comparable<CoreVersion>, Formattable
    A class representing the core major, minor, and patch versions for Version.
    • Constructor Summary

      Constructors 
      Constructor Description
      CoreVersion​(@NotNull java.math.BigInteger major, @NotNull java.math.BigInteger minor, @NotNull java.math.BigInteger patch)
      Constructs a new core version instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(@NotNull CoreVersion o)  
      boolean equals​(java.lang.Object o)  
      @NotNull java.lang.String getFormatted()
      This object represented as a short and human readable string.
      @NotNull java.math.BigInteger getMajor()
      The major version.
      @NotNull java.math.BigInteger getMinor()
      The minor version.
      @NotNull java.math.BigInteger getPatch()
      The patch version
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CoreVersion

        public CoreVersion​(@NotNull
                           @NotNull java.math.BigInteger major,
                           @NotNull
                           @NotNull java.math.BigInteger minor,
                           @NotNull
                           @NotNull java.math.BigInteger patch)
        Constructs a new core version instance.
        Parameters:
        major - The major version.
        minor - The minor version.
        patch - The patch version.
    • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        @Contract(value="null -> false",
                  pure=true)
        public boolean equals​(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 CoreVersion o)
        Specified by:
        compareTo in interface java.lang.Comparable<CoreVersion>
      • 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.