Class Version

  • All Implemented Interfaces:
    java.lang.Comparable<Version>

    public class Version
    extends java.lang.Object
    implements java.lang.Comparable<Version>
    A version string is on the form <major>.<minor>.<micro>.
    • Field Detail

      • INFINITE

        public static final Version INFINITE
      • major

        private short major
      • minor

        private short minor
      • micro

        private short micro
    • Constructor Detail

      • Version

        public Version​(java.lang.String version)
    • Method Detail

      • getMajor

        public int getMajor()
      • getMinor

        public int getMinor()
      • getMicro

        public int getMicro()
      • greaterThan

        public boolean greaterThan​(Version other)
        Returns true if this is greater that other.
        Parameters:
        other - the other Version
        Returns:
        true if this instance is greater than other instance, otherwise false
      • greaterOrEqualsThan

        public boolean greaterOrEqualsThan​(Version other)
        Returns true if this is greater or equals than other.
        Parameters:
        other - the other Version
        Returns:
        true if this instance is greater or equals than other instance, otherwise false
      • lesserThan

        public boolean lesserThan​(Version other)
        Returns true if this is lesser than other.
        Parameters:
        other - the other Version
        Returns:
        true if this instance is lesser than other instance, otherwise false
      • lesserOrEqualsThan

        public boolean lesserOrEqualsThan​(Version other)
        Returns true if this is lesser or equals that other.
        Parameters:
        other - the other Version
        Returns:
        true if this instance is lesser or equals than other instance, otherwise false
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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

        public java.lang.String toString​(java.lang.String prefix,
                                         java.lang.String separator)
      • compareTo

        public int compareTo​(Version otherVersion)
        Specified by:
        compareTo in interface java.lang.Comparable<Version>