Class Version

java.lang.Object
com.aoapps.hodgepodge.version.Version

public final class Version extends Object
A software version consisting of four integer components.
Author:
AO Industries, Inc.
  • Method Details

    • getInstance

      public static Version getInstance(int major, int minor, int release, int build)
      Gets a version number instance from its component parts.
    • valueOf

      public static Version valueOf(String version) throws IllegalArgumentException
      Parses a version number from its string representation.
      Throws:
      IllegalArgumentException
      See Also:
    • toString

      public String toString()
      The toString representation is major.minor.release.build.
      Overrides:
      toString in class Object
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getMajor

      public int getMajor()
      Gets the major version number.

      A change in the first number means a radically new code base, complete uninstall/reinstall may be necessary.

    • getMinor

      public int getMinor()
      Gets the minor version number.

      A change in the second number means significant features have been added, but are generally compatible with previous versions. Update strongly recommended.

    • getRelease

      public int getRelease()
      Gets the release number.

      A change in the third number means fixes or improvements to existing features, but maintaining compatibility with current version. Update recommended.

    • getBuild

      public int getBuild()
      Gets the build number.

      A change in the build number only indicates minor fixes or improvements to existing features. Update not required or even suggested.