java.lang.Object
org.apache.maven.shared.release.versions.Version
All Implemented Interfaces:
Cloneable, Comparable<Version>

public class Version extends Object implements Comparable<Version>, Cloneable

Version class.

  • Field Details

    • STANDARD_PATTERN

      public static final Pattern STANDARD_PATTERN
      Constant STANDARD_PATTERN
    • ALTERNATE_PATTERN

      public static final Pattern ALTERNATE_PATTERN
      Constant ALTERNATE_PATTERN
  • Constructor Details

  • Method Details

    • isSnapshot

      public boolean isSnapshot()

      isSnapshot.

      Returns:
      a boolean
    • toString

      public String toString()

      toString.

      Overrides:
      toString in class Object
      Returns:
      a String object
    • getVersionString

      protected static String getVersionString(Version info, String buildSpecifier, String buildSeparator)

      getVersionString.

      Parameters:
      info - a Version object
      buildSpecifier - a String object
      buildSeparator - a String object
      Returns:
      a String object
    • joinDigitString

      protected static String joinDigitString(List<String> digits)
      Simply joins the items in the list with "." period
      Parameters:
      digits - the list of digits List<String>
      Returns:
      a String containing the items in the list joined by "." period
    • getDigits

      public List<String> getDigits()

      Getter for the field digits.

      Returns:
      a List object
    • getAnnotation

      public String getAnnotation()

      Getter for the field annotation.

      Returns:
      a String object
    • getAnnotationRevSeparator

      public String getAnnotationRevSeparator()

      Getter for the field annotationRevSeparator.

      Returns:
      a String object
    • getAnnotationRevision

      public String getAnnotationRevision()

      Getter for the field annotationRevision.

      Returns:
      a String object
    • getBuildSeparator

      public String getBuildSeparator()

      Getter for the field buildSeparator.

      Returns:
      a String object
    • getBuildSpecifier

      public String getBuildSpecifier()

      Getter for the field buildSpecifier.

      Returns:
      a String object
    • setDigits

      public Version setDigits(List<String> newDigits)

      Setter for the field digits.

      Parameters:
      newDigits - the new list of digits
      Returns:
      a new instance of Version
    • setAnnotationRevision

      public Version setAnnotationRevision(String newAnnotationRevision)

      Setter for the field annotationRevision.

      Parameters:
      newAnnotationRevision - the new annotation revision
      Returns:
      a new instance of Version
    • setBuildSpecifier

      public Version setBuildSpecifier(String newBuildSpecifier)

      Setter for the field buildSpecifier.

      Parameters:
      newBuildSpecifier - the new build specifier
      Returns:
      a new instance of Version
    • compareTo

      public int compareTo(Version other) throws VersionComparisonConflictException

      compareTo.

      Specified by:
      compareTo in interface Comparable<Version>
      Parameters:
      other - a Version object
      Returns:
      a int
      Throws:
      VersionComparisonConflictException - if Version and ArtifactVersion give different results