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
A comparator that respects the build metadata when comparing versions.
|
Modifier and Type | Method and Description |
---|---|
Version |
Version.Builder.build()
Builds a
Version object. |
static Version |
Version.forIntegers(int major)
Creates a new instance of
Version
for the specified version numbers. |
static Version |
Version.forIntegers(int major,
int minor)
Creates a new instance of
Version
for the specified version numbers. |
static Version |
Version.forIntegers(int major,
int minor,
int patch)
Creates a new instance of
Version
for the specified version numbers. |
Version |
Version.incrementBuildMetadata()
Increments the build metadata.
|
Version |
Version.incrementMajorVersion()
Increments the major version.
|
Version |
Version.incrementMajorVersion(String preRelease)
Increments the major version and appends the pre-release version.
|
Version |
Version.incrementMinorVersion()
Increments the minor version.
|
Version |
Version.incrementMinorVersion(String preRelease)
Increments the minor version and appends the pre-release version.
|
Version |
Version.incrementPatchVersion()
Increments the patch version.
|
Version |
Version.incrementPatchVersion(String preRelease)
Increments the patch version and appends the pre-release version.
|
Version |
Version.incrementPreReleaseVersion()
Increments the pre-release version.
|
Version |
Version.setBuildMetadata(String build)
Sets the build metadata.
|
Version |
Version.setPreReleaseVersion(String preRelease)
Sets the pre-release version.
|
static Version |
Version.valueOf(String version)
Creates a new instance of
Version as a
result of parsing the specified version string. |
Modifier and Type | Method and Description |
---|---|
int |
Version.compareTo(Version other)
Compares this version to the other version.
|
int |
Version.compareWithBuildsTo(Version other)
Compare this version to the other version
taking into account the build metadata.
|
boolean |
Version.greaterThan(Version other)
Checks if this version is greater than the other version.
|
boolean |
Version.greaterThanOrEqualTo(Version other)
Checks if this version is greater than or equal to the other version.
|
boolean |
Version.lessThan(Version other)
Checks if this version is less than the other version.
|
boolean |
Version.lessThanOrEqualTo(Version other)
Checks if this version is less than or equal to the other version.
|
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 |
Expression.interpret(Version version)
Interprets the expression.
|
boolean |
CompositeExpression.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. |
Copyright © 2017. All rights reserved.