public class VersionUtils
extends java.lang.Object
Constructor | Description |
---|---|
VersionUtils() |
Modifier and Type | Method | Description |
---|---|---|
static java.util.List<Version> |
allReleasedVersions() |
Returns an immutable, sorted list containing all released versions.
|
static java.util.List<Version> |
allUnreleasedVersions() |
Returns an immutable, sorted list containing all unreleased versions.
|
static java.util.List<Version> |
allVersions() |
Returns an immutable, sorted list containing all versions, both released and unreleased.
|
static Version |
compatibleFutureVersion(Version version) |
returns the first future compatible version
|
static Version |
getFirstVersion() |
Returns the oldest released
Version |
static Version |
getPreviousMinorVersion() |
Returns the released
Version before the Version.CURRENT
where the minor version is less than the currents minor version. |
static Version |
getPreviousVersion() |
Get the released version before
Version.CURRENT . |
static Version |
getPreviousVersion(Version version) |
Get the released version before
version . |
static Version |
incompatibleFutureVersion(Version version) |
returns the first future incompatible version
|
static Version |
maxCompatibleVersion(Version version) |
Returns the maximum
Version that is compatible with the given version. |
static Version |
randomCompatibleVersion(java.util.Random random,
Version version) |
Returns a random
Version from all available versions, that is compatible with the given version. |
static Version |
randomVersion(java.util.Random random) |
Returns a random
Version from all available versions. |
static Version |
randomVersionBetween(java.util.Random random,
Version minVersion,
Version maxVersion) |
public static java.util.List<Version> allReleasedVersions()
public static java.util.List<Version> allUnreleasedVersions()
public static java.util.List<Version> allVersions()
public static Version getPreviousVersion(Version version)
version
.public static Version getPreviousVersion()
Version.CURRENT
.public static Version getPreviousMinorVersion()
Version
before the Version.CURRENT
where the minor version is less than the currents minor version.public static Version randomVersion(java.util.Random random)
Version
from all available versions.public static Version randomCompatibleVersion(java.util.Random random, Version version)
Version
from all available versions, that is compatible with the given version.public static Version randomVersionBetween(java.util.Random random, @Nullable Version minVersion, @Nullable Version maxVersion)
public static Version incompatibleFutureVersion(Version version)
public static Version compatibleFutureVersion(Version version)