public final class BuildNumber extends java.lang.Object implements java.lang.Comparable<BuildNumber>
Modifier and Type | Field and Description |
---|---|
static int |
SNAPSHOT_VALUE |
Constructor and Description |
---|
BuildNumber(java.lang.String productCode,
int... components) |
BuildNumber(java.lang.String productCode,
int baselineVersion,
int buildNumber) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asString() |
java.lang.String |
asStringWithoutProductCode() |
java.lang.String |
asStringWithoutProductCodeAndSnapshot() |
int |
compareTo(BuildNumber o) |
static BuildNumber |
currentVersion()
This method is for internal platform use only.
|
boolean |
equals(java.lang.Object o) |
static BuildNumber |
fromString(java.lang.String version) |
static BuildNumber |
fromString(java.lang.String version,
java.lang.String pluginName,
java.lang.String productCodeIfAbsentInVersion) |
static BuildNumber |
fromStringOrNull(java.lang.String version)
Attempts to parse build number from the specified string.
|
static BuildNumber |
fromStringWithProductCode(java.lang.String version,
java.lang.String productCode) |
int |
getBaselineVersion() |
int [] |
getComponents() |
java.lang.String |
getProductCode() |
int |
hashCode() |
boolean |
isSnapshot() |
java.lang.String |
toString() |
BuildNumber |
withoutProductCode() |
public static final int SNAPSHOT_VALUE
public BuildNumber(java.lang.String productCode, int baselineVersion, int buildNumber)
public BuildNumber(java.lang.String productCode, int... components)
public java.lang.String getProductCode()
public int getBaselineVersion()
public int [] getComponents()
public boolean isSnapshot()
public BuildNumber withoutProductCode()
public java.lang.String asString()
public java.lang.String asStringWithoutProductCode()
public java.lang.String asStringWithoutProductCodeAndSnapshot()
public static BuildNumber fromStringOrNull(java.lang.String version)
null
if the string is not a valid build number.public static BuildNumber fromString(java.lang.String version)
public static BuildNumber fromStringWithProductCode(java.lang.String version, java.lang.String productCode)
public static BuildNumber fromString(java.lang.String version, java.lang.String pluginName, java.lang.String productCodeIfAbsentInVersion)
public int compareTo(BuildNumber o)
compareTo
in interface java.lang.Comparable<BuildNumber>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static BuildNumber currentVersion()
ApplicationInfo.getBuild()
instead.