public class Version extends Object implements Comparable<Version>, Cloneable
Version class.
Modifier and Type | Field and Description |
---|---|
static Pattern |
ALTERNATE_PATTERN
Constant
ALTERNATE_PATTERN |
static Pattern |
STANDARD_PATTERN
Constant
STANDARD_PATTERN |
Constructor and Description |
---|
Version(String version)
Constructor for Version.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version other)
compareTo.
|
String |
getAnnotation()
Getter for the field
annotation . |
String |
getAnnotationRevision()
Getter for the field
annotationRevision . |
String |
getAnnotationRevSeparator()
Getter for the field
annotationRevSeparator . |
String |
getBuildSeparator()
Getter for the field
buildSeparator . |
String |
getBuildSpecifier()
Getter for the field
buildSpecifier . |
List<String> |
getDigits()
Getter for the field
digits . |
protected static String |
getVersionString(Version info,
String buildSpecifier,
String buildSeparator)
getVersionString.
|
boolean |
isSnapshot()
isSnapshot.
|
protected static String |
joinDigitString(List<String> digits)
Simply joins the items in the list with "." period
|
Version |
setAnnotationRevision(String newAnnotationRevision)
Setter for the field
annotationRevision . |
Version |
setBuildSpecifier(String newBuildSpecifier)
Setter for the field
buildSpecifier . |
Version |
setDigits(List<String> newDigits)
Setter for the field
digits . |
String |
toString()
toString.
|
public static final Pattern STANDARD_PATTERN
STANDARD_PATTERN
public static final Pattern ALTERNATE_PATTERN
ALTERNATE_PATTERN
public Version(String version) throws VersionParseException
Constructor for Version.
version
- a String
objectVersionParseException
- if any.public boolean isSnapshot()
isSnapshot.
public String toString()
toString.
protected static String getVersionString(Version info, String buildSpecifier, String buildSeparator)
getVersionString.
protected static String joinDigitString(List<String> digits)
digits
- the list of digits List<String>
String
containing the items in the list joined by "." periodpublic String getAnnotation()
Getter for the field annotation
.
String
objectpublic String getAnnotationRevSeparator()
Getter for the field annotationRevSeparator
.
String
objectpublic String getAnnotationRevision()
Getter for the field annotationRevision
.
String
objectpublic String getBuildSeparator()
Getter for the field buildSeparator
.
String
objectpublic String getBuildSpecifier()
Getter for the field buildSpecifier
.
String
objectpublic Version setDigits(List<String> newDigits)
Setter for the field digits
.
newDigits
- the new list of digitspublic Version setAnnotationRevision(String newAnnotationRevision)
Setter for the field annotationRevision
.
newAnnotationRevision
- the new annotation revisionpublic Version setBuildSpecifier(String newBuildSpecifier)
Setter for the field buildSpecifier
.
newBuildSpecifier
- the new build specifierpublic int compareTo(Version other) throws VersionComparisonConflictException
compareTo.
compareTo
in interface Comparable<Version>
other
- a Version
objectVersionComparisonConflictException
- if Version
and
ArtifactVersion
give different resultsCopyright © 2002–2024 The Apache Software Foundation. All rights reserved.