| Modifier and Type | Field | Description |
|---|---|---|
static Version |
Version.COMPLIANCE |
Semantic Version Specification to which this class complies.
|
| Modifier and Type | Field | Description |
|---|---|---|
static java.util.Comparator<Version> |
Version.NATURAL_ORDER |
Comparator for natural version ordering.
|
static java.util.Comparator<Version> |
Version.WITH_BUILD_META_DATA_ORDER |
Comparator for ordering versions with additionally considering the build meta data
field when comparing versions.
|
| Modifier and Type | Method | Description |
|---|---|---|
static Version |
Version.create(int major,
int minor,
int patch) |
Creates a new Version from the three provided components.
|
static Version |
Version.create(int major,
int minor,
int patch,
java.lang.String preRelease) |
Creates a new Version from the provided components.
|
static Version |
Version.create(int major,
int minor,
int patch,
java.lang.String preRelease,
java.lang.String buildMetaData) |
Creates a new Version from the provided components.
|
Version |
Version.max(Version other) |
Returns the greater of this version and the given version according to its natural
ordering.
|
static Version |
Version.max(Version v1,
Version v2) |
Returns the greater of the two given versions by comparing them using their natural
ordering.
|
Version |
Version.min(Version other) |
Returns the lower of this version and the given version according to its natural
ordering.
|
static Version |
Version.min(Version v1,
Version v2) |
Returns the lower of the two given versions by comparing them using their natural
ordering.
|
Version |
Version.nextBuildMetaData() |
Derives a new Version instance from this one by only incrementing the
build-meta-data identifier.
|
Version |
Version.nextMajor() |
Given this Version, returns the next major Version.
|
Version |
Version.nextMajor(java.lang.String newPrelease) |
Given this Version, returns the next major Version.
|
Version |
Version.nextMajor(java.lang.String[] newPrelease) |
Given this Version, returns the next major Version.
|
Version |
Version.nextMinor() |
Given this version, returns the next minor version.
|
Version |
Version.nextMinor(java.lang.String newPrelease) |
Given this version, returns the next minor version.
|
Version |
Version.nextMinor(java.lang.String[] newPrelease) |
Given this version, returns the next minor version.
|
Version |
Version.nextPatch() |
Given this version, returns the next patch version.
|
Version |
Version.nextPatch(java.lang.String newPrelease) |
Given this version, returns the next patch version.
|
Version |
Version.nextPatch(java.lang.String[] newPrelease) |
Given this version, returns the next patch version.
|
Version |
Version.nextPreRelease() |
Derives a new Version instance from this one by only incrementing the pre-release
identifier.
|
static Version |
Version.parseVersion(java.lang.String versionString) |
Tries to parse the provided String as a semantic version.
|
static Version |
Version.parseVersion(java.lang.String versionString,
boolean allowPreRelease) |
Tries to parse the provided String as a semantic version.
|
Version |
Version.toLowerCase() |
Returns a new Version where all identifiers are converted to lower case letters.
|
Version |
Version.toUpperCase() |
Returns a new Version where all identifiers are converted to upper case letters.
|
Version |
Version.withBuildMetaData(java.lang.String newBuildMetaData) |
Creates a new Version from this one, replacing only the build-meta-data part with
the given String.
|
Version |
Version.withBuildMetaData(java.lang.String[] newBuildMetaData) |
Creates a new Version from this one, replacing only the build-meta-data part with
the given array.
|
Version |
Version.withMajor(int newMajor) |
Creates a new Version from this one, replacing only the major part with the given
one.
|
Version |
Version.withMinor(int newMinor) |
Creates a new Version from this one, replacing only the minor part with the given
one.
|
Version |
Version.withPatch(int newPatch) |
Creates a new Version from this one, replacing only the patch part with the given
one.
|
Version |
Version.withPreRelease(java.lang.String newPreRelease) |
Creates a new Version from this one, replacing only the pre-release part with the
given String.
|
Version |
Version.withPreRelease(java.lang.String[] newPreRelease) |
Creates a new Version from this one, replacing only the pre-release part with the
given array.
|
| Modifier and Type | Method | Description |
|---|---|---|
static int |
Version.compare(Version v1,
Version v2) |
Compares two versions, following the semantic version specification.
|
int |
Version.compareTo(Version other) |
Compares this version to the provided one, following the semantic
versioning specification.
|
int |
Version.compareToWithBuildMetaData(Version other) |
Compares this version to the provided one.
|
static int |
Version.compareWithBuildMetaData(Version v1,
Version v2) |
Compares two Versions with additionally considering the build meta data field if
all other parts are equal.
|
boolean |
Version.isGreaterThan(Version other) |
Tests whether this version is strictly greater than the given other version in
terms of precedence.
|
boolean |
Version.isLowerThan(Version other) |
Tests whether this version is strictly lower than the given other version in terms
of precedence.
|
Version |
Version.max(Version other) |
Returns the greater of this version and the given version according to its natural
ordering.
|
static Version |
Version.max(Version v1,
Version v2) |
Returns the greater of the two given versions by comparing them using their natural
ordering.
|
Version |
Version.min(Version other) |
Returns the lower of this version and the given version according to its natural
ordering.
|
static Version |
Version.min(Version v1,
Version v2) |
Returns the lower of the two given versions by comparing them using their natural
ordering.
|
Copyright © 2014–2018. All rights reserved.