| Constructor and Description |
|---|
Versions() |
| Modifier and Type | Method and Description |
|---|---|
static Version |
addSnapshot(Version version)
Create a version from the given one and set to it the
snapshot state to true. |
static Version |
decrements(Version version,
int componantPosition)
Creates a new version from this one with the number componant decremented at the given position.
|
static boolean |
equals(String version0,
String version1)
Tests if two versions are equals.
|
static Version |
extractVersion(Version version,
int component)
Create a new version containing a single component from a given version.
|
static Version |
extractVersion(Version version,
int firstComponent,
int lastComponent)
Create a new version containing a sub set of component from a given version.
|
static boolean |
greaterThan(String version0,
String version1)
Tests if the first version is greater than the second version.
|
static Version |
increments(Version version)
Creates a new version from this one incremented.
|
static Version |
increments(Version version,
char componantSeperator)
Creates a new version from this one incremented.
|
static Version |
increments(Version version,
int componantPosition)
Creates a new version from this one with the number componant incremented at the given position.
|
static Version |
removeSnapshot(Version version)
Create a version from the given one and set to it the
snapshot state to false. |
static boolean |
smallerThan(String version0,
String version1)
Tests if the first version is smaller than the second version.
|
static Version |
valueOf(String version)
Shortcut method to get a version from his string representation.
|
public static Version valueOf(String version)
version - string representation of the versionpublic static boolean equals(String version0, String version1)
version0 - the first versionversion1 - the second versiontrue if versions are equals, false otherwise.public static boolean smallerThan(String version0, String version1)
version0 - the first versionversion1 - the second versiontrue if version0 is before version1,
false otherwise.public static boolean greaterThan(String version0, String version1)
version0 - the first versionversion1 - the second versiontrue if version0 is after version1,
false otherwise.public static Version addSnapshot(Version version)
snapshot state to true.version - version to clonesnapshot state to trueIllegalArgumentException - if snapshot state is already set to true on
the given version.public static Version removeSnapshot(Version version)
snapshot state to false.version - version to clonesnapshot state to trueIllegalArgumentException - if snapshot state is already set to false on
the given versionpublic static Version extractVersion(Version version, int component)
version - original versioncomponent - component index to extractVersion with a single componentpublic static Version extractVersion(Version version, int firstComponent, int lastComponent)
version - original versionfirstComponent - first component indexlastComponent - last component indexVersion with a components sub setpublic static Version increments(Version version)
public static Version increments(Version version, char componantSeperator)
componantSeperator - the componant separator to use the last componant is a classifierpublic static Version increments(Version version, int componantPosition)
componantPosition - position of the version componant to incrementpublic static Version decrements(Version version, int componantPosition)
componantPosition - position of the version componant to incrementCopyright © 2004–2015 CodeLutin. All rights reserved.