Class Version

java.lang.Object
com.bc.ceres.core.runtime.Version
All Implemented Interfaces:
Comparable

public class Version extends Object implements Comparable
Represents a version identifier.
  • Constructor Details

    • Version

      public Version(int major, int minor, int micro, String qualifier)
  • Method Details

    • parseVersion

      public static Version parseVersion(String text)
      Parses a version text in the form {<number><sep>}[<qualifier>], where <sep> is one of '.', '-' or '_'. If no number was found 1.[<qualifier>] is assumed, e.g. "M1", is the same as "1.0.0.M1".
      Parameters:
      text - the text to parse
      Returns:
      the version identifier
    • getNumberCount

      public int getNumberCount()
    • getNumber

      public int getNumber(int i)
    • getMajor

      public int getMajor()
    • getMinor

      public int getMinor()
    • getMicro

      public int getMicro()
    • getQualifier

      public String getQualifier()
    • compare

      public static int compare(Version v1, Version v2)
    • toString

      public String toString()
      Returns the string representation of the version in the form {major}.{minor}.{micro}-{qualifier}.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the version.
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object