public class VersionUtils
extends java.lang.Object
Constructor and Description |
---|
VersionUtils() |
Modifier and Type | Method and 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 |
getFirstVersion()
Returns the oldest
Version |
static Version |
getPreviousMinorVersion()
Returns the
Version before the Version.CURRENT where the minor version is less than the currents minor version. |
static Version |
getPreviousVersion()
Returns the
Version before the Version.CURRENT |
static Version |
getPreviousVersion(Version version) |
static Version |
incompatibleFutureVersion(Version version)
returns the first future incompatible version
|
static boolean |
isSnapshot(Version 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
before the 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, Version minVersion, Version maxVersion)
public static boolean isSnapshot(Version version)
public static Version incompatibleFutureVersion(Version version)