Package io. github. z4kn4fein. semver
Types
This class describes a semantic version and related operations following the semver 2.0.0 specification. Instances of this class are immutable, which makes them thread-safe.
Version throws this exception when the semantic version parsing fails due to an invalid format.
Functions
Increments the version by its MAJOR number. When the preRelease parameter is set, a pre-release version will be produced from the next MAJOR version. The value of preRelease will be the first pre-release identifier of the new version suffixed with zero.
Increments the version by its MINOR number. When the preRelease parameter is set, a pre-release version will be produced from the next MINOR version. The value of preRelease will be the first pre-release identifier of the new version suffixed with zero.
Increments the version by its PRE-RELEASE identifier or produces the next pre-release of a stable version. The preRelease parameter's value is used for setting the pre-release identity when the version is stable or has a different pre-release name. If the version is already pre-release and the first identifier matches with the preRelease parameter, a simple incrementation will apply.
Determines whether a Version satisfies a Constraint or not.
Determines whether a Version satisfies each Constraint in a collection or not.
Determines whether a Version satisfies at least one Constraint in a collection or not.
Parses the string as a Version and returns the result or null if the string is not a valid representation of a semantic version.