public class JGitFlowVersionInfo extends Object implements org.apache.maven.shared.release.versions.VersionInfo
Modifier and Type | Field and Description |
---|---|
static Pattern |
ALTERNATE_PATTERN |
static Pattern |
STANDARD_PATTERN |
Constructor and Description |
---|
JGitFlowVersionInfo(List<String> digits,
String annotation,
String annotationRevision,
String buildSpecifier,
String annotationSeparator,
String annotationRevSeparator,
String buildSeparator) |
JGitFlowVersionInfo(String version)
Constructs this object and parses the supplied version string.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(org.apache.maven.shared.release.versions.VersionInfo obj)
Compares this
JGitFlowVersionInfo to the supplied JGitFlowVersionInfo
to determine which version is greater. |
boolean |
equals(Object obj) |
String |
getAnnotation() |
String |
getAnnotationRevision() |
String |
getBuildSpecifier() |
String |
getDecrementedHotfixVersionString() |
List<String> |
getDigits() |
String |
getHotfixVersionString() |
org.apache.maven.shared.release.versions.VersionInfo |
getNextDevelopmentVersion(int indexOfDigitsToIncrement) |
org.apache.maven.shared.release.versions.VersionInfo |
getNextVersion() |
String |
getReleaseVersionString() |
String |
getSnapshotVersionString() |
protected static String |
getVersionString(JGitFlowVersionInfo info,
String buildSpecifier,
String buildSeparator) |
protected String |
incrementVersionString(String s)
Takes a string and increments it as an integer.
|
boolean |
isSnapshot() |
protected static String |
joinDigitString(List<String> digits)
Simply joins the items in the list with "." period
|
String |
toString() |
public static final Pattern STANDARD_PATTERN
public static final Pattern ALTERNATE_PATTERN
public JGitFlowVersionInfo(String version) throws org.apache.maven.shared.release.versions.VersionParseException
version
- org.apache.maven.shared.release.versions.VersionParseException
public boolean isSnapshot()
isSnapshot
in interface org.apache.maven.shared.release.versions.VersionInfo
public org.apache.maven.shared.release.versions.VersionInfo getNextVersion()
getNextVersion
in interface org.apache.maven.shared.release.versions.VersionInfo
public int compareTo(org.apache.maven.shared.release.versions.VersionInfo obj)
JGitFlowVersionInfo
to the supplied JGitFlowVersionInfo
to determine which version is greater.compareTo
in interface Comparable<org.apache.maven.shared.release.versions.VersionInfo>
obj
- the comparison versionIllegalArgumentException
- if the components differ between the objects or if either of the annotations can not be determined.protected String incrementVersionString(String s)
s
- public String getSnapshotVersionString()
getSnapshotVersionString
in interface org.apache.maven.shared.release.versions.VersionInfo
public String getReleaseVersionString()
getReleaseVersionString
in interface org.apache.maven.shared.release.versions.VersionInfo
public String getHotfixVersionString()
public org.apache.maven.shared.release.versions.VersionInfo getNextDevelopmentVersion(int indexOfDigitsToIncrement)
public String getDecrementedHotfixVersionString()
protected static String getVersionString(JGitFlowVersionInfo info, String buildSpecifier, String buildSeparator)
protected static String joinDigitString(List<String> digits)
digits
- public String getAnnotation()
public String getAnnotationRevision()
public String getBuildSpecifier()
Copyright © 2017 Atlassian. All rights reserved.