Class Version

java.lang.Object
com.thebuzzmedia.exiftool.Version
All Implemented Interfaces:
Comparable<Version>

public final class Version extends Object implements Comparable<Version>
Define a version number with:
  • A major identifier.
  • A minor identifier.
  • A patch identifier.
  • Constructor Details

    • Version

      public Version(String version)
      Create new version number from a given string formatted such as: [major].[minor].[patch]. Major identifier is mandatory, other elements are optional and will be initialized to zero by default. Valid format: 1.1.0 / 1.1 / 1
      Parameters:
      version - Version number.
  • Method Details

    • getMajor

      public int getMajor()
      Gets major.
      Returns:
      major.
    • getMinor

      public int getMinor()
      Gets minor.
      Returns:
      minor.
    • getPatch

      public int getPatch()
      Gets patch.
      Returns:
      patch.
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Version version)
      Specified by:
      compareTo in interface Comparable<Version>