Uses of Class
com.github.zafarkhaja.semver.Version
-
Packages that use Version 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. -
-
Uses of Version in com.github.zafarkhaja.semver
Fields in com.github.zafarkhaja.semver with type parameters of type Version Modifier and Type Field Description static java.util.Comparator<Version>
Version. BUILD_AWARE_ORDER
A comparator that respects the build metadata when comparing versions.Methods in com.github.zafarkhaja.semver that return Version Modifier and Type Method Description Version
Version.Builder. build()
Builds aVersion
object.static Version
Version. forIntegers(int major)
Creates a new instance ofVersion
for the specified version numbers.static Version
Version. forIntegers(int major, int minor)
Creates a new instance ofVersion
for the specified version numbers.static Version
Version. forIntegers(int major, int minor, int patch)
Creates a new instance ofVersion
for the specified version numbers.Version
Version. incrementBuildMetadata()
Increments the build metadata.Version
Version. incrementMajorVersion()
Increments the major version.Version
Version. incrementMajorVersion(java.lang.String preRelease)
Increments the major version and appends the pre-release version.Version
Version. incrementMinorVersion()
Increments the minor version.Version
Version. incrementMinorVersion(java.lang.String preRelease)
Increments the minor version and appends the pre-release version.Version
Version. incrementPatchVersion()
Increments the patch version.Version
Version. incrementPatchVersion(java.lang.String preRelease)
Increments the patch version and appends the pre-release version.Version
Version. incrementPreReleaseVersion()
Increments the pre-release version.Version
VersionParser. parse(java.lang.String input)
Parses the input string.private Version
VersionParser. parseValidSemVer()
Parses the <valid semver> non-terminal.(package private) static Version
VersionParser. parseValidSemVer(java.lang.String version)
Parses the whole version including pre-release version and build metadata.Version
Version. setBuildMetadata(java.lang.String build)
Sets the build metadata.Version
Version. setPreReleaseVersion(java.lang.String preRelease)
Sets the pre-release version.static Version
Version. valueOf(java.lang.String version)
Creates a new instance ofVersion
as a result of parsing the specified version string.Methods in com.github.zafarkhaja.semver with parameters of type Version Modifier and Type Method Description int
Version.BuildAwareOrder. compare(Version v1, Version v2)
Compares twoVersion
instances taking into account their build metadata.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. -
Uses of Version in com.github.zafarkhaja.semver.expr
Fields in com.github.zafarkhaja.semver.expr declared as Version Modifier and Type Field Description private Version
Equal. parsedVersion
The parsed version, the right-hand operand of the "equal" operator.private Version
Greater. parsedVersion
The parsed version, the right-hand operand of the "greater than" operator.private Version
GreaterOrEqual. parsedVersion
The parsed version, the right-hand operand of the "greater than or equal to" operator.private Version
Less. parsedVersion
The parsed version, the right-hand operand of the "less than" operator.private Version
LessOrEqual. parsedVersion
The parsed version, the right-hand operand of the "less than or equal to" operator.private Version
NotEqual. parsedVersion
The parsed version, the right-hand operand of the "not equal" operator.Methods in com.github.zafarkhaja.semver.expr that return Version Modifier and Type Method Description private Version
ExpressionParser. parseVersion()
Parses the <version> non-terminal.private Version
ExpressionParser. versionFor(int major)
Creates aVersion
instance for the specified major version.private Version
ExpressionParser. versionFor(int major, int minor)
Creates aVersion
instance for the specified major and minor versions.private Version
ExpressionParser. versionFor(int major, int minor, int patch)
Creates aVersion
instance for the specified major, minor and patch versions.Methods in com.github.zafarkhaja.semver.expr with parameters of type Version Modifier and Type Method Description static CompositeExpression
CompositeExpression.Helper. eq(Version version)
Creates aCompositeExpression
with an underlyingEqual
expression.static CompositeExpression
CompositeExpression.Helper. gt(Version version)
Creates aCompositeExpression
with an underlyingGreater
expression.static CompositeExpression
CompositeExpression.Helper. gte(Version version)
Creates aCompositeExpression
with an underlyingGreaterOrEqual
expression.boolean
And. interpret(Version version)
Checks if both operands evaluate totrue
.boolean
CompositeExpression. interpret(Version version)
Interprets the expression.boolean
Equal. interpret(Version version)
Checks if the current version equals the parsed version.boolean
Expression. interpret(Version version)
Interprets the expression.boolean
Greater. interpret(Version version)
Checks if the current version is greater than the parsed version.boolean
GreaterOrEqual. interpret(Version version)
Checks if the current version is greater than or equal to the parsed version.boolean
Less. interpret(Version version)
Checks if the current version is less than the parsed version.boolean
LessOrEqual. interpret(Version version)
Checks if the current version is less than or equal to the parsed version.boolean
Not. interpret(Version version)
Negates the given expression.boolean
NotEqual. interpret(Version version)
Checks if the current version does not equal the parsed version.boolean
Or. interpret(Version version)
Checks if one of the operands evaluates totrue
.static CompositeExpression
CompositeExpression.Helper. lt(Version version)
Creates aCompositeExpression
with an underlyingLess
expression.static CompositeExpression
CompositeExpression.Helper. lte(Version version)
Creates aCompositeExpression
with an underlyingLessOrEqual
expression.static CompositeExpression
CompositeExpression.Helper. neq(Version version)
Creates aCompositeExpression
with an underlyingNotEqual
expression.Constructors in com.github.zafarkhaja.semver.expr with parameters of type Version Constructor Description Equal(Version parsedVersion)
Constructs aEqual
expression with the parsed version.Greater(Version parsedVersion)
Constructs aGreater
expression with the parsed version.GreaterOrEqual(Version parsedVersion)
Constructs aGreaterOrEqual
expression with the parsed version.Less(Version parsedVersion)
Constructs aLess
expression with the parsed version.LessOrEqual(Version parsedVersion)
Constructs aLessOrEqual
expression with the parsed version.NotEqual(Version parsedVersion)
Constructs aNotEqual
expression with the parsed version.
-