| Package | Description |
|---|---|
| com.github.zafarkhaja.semver |
This is the root package of the Java SemVer library.
|
| com.github.zafarkhaja.semver.expr |
This package contains classes that implement the SemVer Expressions.
|
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Version> |
Version.BUILD_AWARE_ORDER
Deprecated.
forRemoval since 0.10.0, use
compareTo(Version) |
static Comparator<Version> |
Version.INCREMENT_ORDER
A comparator that sorts versions in increment order, from lowest to highest.
|
static Comparator<Version> |
Version.PRECEDENCE_ORDER
A comparator that sorts versions in (highest) precedence order.
|
| Modifier and Type | Method and Description |
|---|---|
Version |
Version.Builder.build()
Obtains a
Version instance with previously set values. |
static Version |
Version.forIntegers(int major)
Deprecated.
forRemoval since 0.10.0, use
of(long) |
static Version |
Version.forIntegers(int major,
int minor)
Deprecated.
forRemoval since 0.10.0, use
of(long, long) |
static Version |
Version.forIntegers(int major,
int minor,
int patch)
Deprecated.
forRemoval since 0.10.0, use
of(long, long, long) |
Version |
Version.incrementBuildMetadata()
Deprecated.
forRemoval since 0.10.0
|
Version |
Version.incrementMajorVersion()
Deprecated.
forRemoval since 0.10.0, use
nextMajorVersion(String...) |
Version |
Version.incrementMajorVersion(String preRelease)
Deprecated.
forRemoval since 0.10.0, use
nextMajorVersion(String...) |
Version |
Version.incrementMinorVersion()
Deprecated.
forRemoval since 0.10.0, use
nextMinorVersion(String...) |
Version |
Version.incrementMinorVersion(String preRelease)
Deprecated.
forRemoval since 0.10.0, use
nextMinorVersion(String...) |
Version |
Version.incrementPatchVersion()
Deprecated.
forRemoval since 0.10.0, use
nextPatchVersion(String...) |
Version |
Version.incrementPatchVersion(String preRelease)
Deprecated.
forRemoval since 0.10.0, use
nextPatchVersion(String...) |
Version |
Version.incrementPreReleaseVersion()
Deprecated.
forRemoval since 0.10.0, use
nextPreReleaseVersion(String...) |
Version |
Version.nextMajorVersion(long major,
String... preReleaseIds)
Obtains the next
Version of the specified major version number,
with an optional pre-release version label. |
Version |
Version.nextMajorVersion(String... preReleaseIds)
Obtains the next
Version by incrementing the major version number
by one, with an optional pre-release version label. |
Version |
Version.nextMinorVersion(long minor,
String... preReleaseIds)
Obtains the next
Version of the specified minor version number,
with an optional pre-release version label. |
Version |
Version.nextMinorVersion(String... preReleaseIds)
Obtains the next
Version by incrementing the minor version number
by one, with an optional pre-release version label. |
Version |
Version.nextPatchVersion(long patch,
String... preReleaseIds)
Obtains the next
Version of the specified patch version number,
with an optional pre-release version label. |
Version |
Version.nextPatchVersion(String... preReleaseIds)
Obtains the next
Version by incrementing the patch version number
by one, with an optional pre-release version label. |
Version |
Version.nextPreReleaseVersion(String... ids)
Obtains the next
Version by incrementing or replacing the
pre-release version. |
static Version |
Version.of(long major)
Obtains a
Version instance of the specified major version. |
static Version |
Version.of(long major,
long minor)
Obtains a
Version instance of the specified major and minor versions. |
static Version |
Version.of(long major,
long minor,
long patch)
Obtains a
Version instance of the specified major, minor and
patch versions. |
static Version |
Version.of(long major,
long minor,
long patch,
String preRelease)
Obtains a
Version instance of the specified major, minor, patch
and pre-release versions. |
static Version |
Version.of(long major,
long minor,
long patch,
String preRelease,
String build)
Obtains a
Version instance of the specified major, minor, patch
and pre-release versions, as well as build metadata. |
static Version |
Version.of(long major,
long minor,
String preRelease)
Obtains a
Version instance of the specified major, minor and
pre-release versions. |
static Version |
Version.of(long major,
long minor,
String preRelease,
String build)
Obtains a
Version instance of the specified major, minor and
pre-release versions, as well as build metadata. |
static Version |
Version.of(long major,
String preRelease)
Obtains a
Version instance of the specified major and pre-release
versions. |
static Version |
Version.of(long major,
String preRelease,
String build)
Obtains a
Version instance of the specified major and pre-release
versions, as well as build metadata. |
static Version |
Version.parse(String version)
Obtains a
Version instance by parsing the specified string in
strict mode, which ensures full compliance with the specification. |
static Version |
Version.parse(String version,
boolean strictly)
Obtains a
Version instance by parsing the specified string. |
Version |
Version.setBuildMetadata(String build)
Deprecated.
forRemoval since 0.10.0, use
withBuildMetadata(String...) |
Version |
Version.setPreReleaseVersion(String preRelease)
Deprecated.
forRemoval since 0.10.0, consider using
nextPreReleaseVersion(String...) |
Version |
Version.toStableVersion()
Obtains the next
Version by dropping the pre-release version. |
static Version |
Version.valueOf(String version)
Deprecated.
forRemoval since 0.10.0, use
parse(String) |
Version |
Version.withBuildMetadata(String... ids)
Obtains a new
Version with the specified build identifiers. |
Version |
Version.withoutBuildMetadata()
Obtains a (new)
Version without build metadata. |
| Modifier and Type | Method and Description |
|---|---|
static Optional<Version> |
Version.tryParse(String version)
Tries to obtain a
Version instance by parsing the specified string
in strict mode, which ensures full compliance with the specification. |
static Optional<Version> |
Version.tryParse(String version,
boolean strictly)
Tries to obtain a
Version instance by parsing the specified string. |
| Modifier and Type | Method and Description |
|---|---|
int |
Version.compareTo(Version other)
Compares versions, along with their build metadata.
|
int |
Version.compareToIgnoreBuildMetadata(Version other)
Compares versions, ignoring their build metadata.
|
int |
Version.compareWithBuildsTo(Version other)
Deprecated.
forRemoval since 0.10.0, use
compareTo(Version) |
boolean |
Version.greaterThan(Version other)
Deprecated.
forRemoval since 0.10.0, use
isHigherThan(Version) |
boolean |
Version.greaterThanOrEqualTo(Version other)
Deprecated.
forRemoval since 0.10.0, use
isHigherThanOrEquivalentTo(Version) |
boolean |
Version.isEquivalentTo(Version other)
Determines if this
Version has the same precedence as the
specified Version. |
boolean |
Version.isHigherThan(Version other)
Determines if this
Version has a higher precedence compared with
the specified Version. |
boolean |
Version.isHigherThanOrEquivalentTo(Version other)
Determines if this
Version has a higher or equal precedence
compared with the specified Version. |
boolean |
Version.isLowerThan(Version other)
Determines if this
Version has a lower precedence compared with
the specified Version. |
boolean |
Version.isLowerThanOrEquivalentTo(Version other)
Determines if this
Version has a lower or equal precedence
compared with the specified Version. |
boolean |
Version.isPublicApiCompatibleWith(Version other)
Checks if this
Version is compatible with the specified Version
in terms of their public API. |
boolean |
Version.isSameMajorVersionAs(Version other)
Checks if this
Version is compatible with the specified Version
in terms of their major versions. |
boolean |
Version.isSameMinorVersionAs(Version other)
Checks if this
Version is compatible with the specified Version
in terms of their major and minor versions. |
boolean |
Version.isSamePatchVersionAs(Version other)
Checks if this
Version is compatible with the specified Version
in terms of their major, minor and patch versions. |
boolean |
Version.lessThan(Version other)
Deprecated.
forRemoval since 0.10.0, use
isLowerThan(Version) |
boolean |
Version.lessThanOrEqualTo(Version other)
Deprecated.
forRemoval since 0.10.0, use
isLowerThanOrEquivalentTo(Version) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Version.satisfies(Predicate<Version> predicate)
Checks if this
Version satisfies the specified predicate. |
| Modifier and Type | Method and Description |
|---|---|
static CompositeExpression |
CompositeExpression.Helper.eq(Version version)
Creates a
CompositeExpression with
an underlying Equal expression. |
static CompositeExpression |
CompositeExpression.Helper.gt(Version version)
Creates a
CompositeExpression with
an underlying Greater expression. |
static CompositeExpression |
CompositeExpression.Helper.gte(Version version)
Creates a
CompositeExpression with an
underlying GreaterOrEqual expression. |
boolean |
CompositeExpression.interpret(Version version)
Interprets the expression.
|
boolean |
Expression.interpret(Version version)
Interprets the expression.
|
static CompositeExpression |
CompositeExpression.Helper.lt(Version version)
Creates a
CompositeExpression with
an underlying Less expression. |
static CompositeExpression |
CompositeExpression.Helper.lte(Version version)
Creates a
CompositeExpression with an
underlying LessOrEqual expression. |
static CompositeExpression |
CompositeExpression.Helper.neq(Version version)
Creates a
CompositeExpression with
an underlying NotEqual expression. |
default boolean |
Expression.test(Version version) |
Copyright © 2024. All rights reserved.