Package-level declarations

Types

Link copied to clipboard
@Serializable(with = ConstraintSerializer::class)
class Constraint

This class describes a semantic version constraint. It provides ability to verify whether a version satisfies one or more conditions within a constraint.

Link copied to clipboard

Constraint throws this exception when the constraint parsing fails due to an invalid format.

Link copied to clipboard
object ConstraintSerializer : KSerializer<Constraint>

Built-in kotlinx.serialization serializer that encodes and decodes Constraint as its string representation.

Functions

Link copied to clipboard
infix fun Constraint.satisfiedBy(version: Version): Boolean

Determines whether a Constraint is satisfied by a Version or not.

Link copied to clipboard

Determines whether a Constraint is satisfied by each Version in a collection or not.

Link copied to clipboard

Determines whether a Constraint is satisfied by at least one Version in a collection or not.

Link copied to clipboard

Parses the string as a Constraint and returns the result or throws a ConstraintFormatException if the string is not a valid representation of a constraint.

Link copied to clipboard

Parses the string as a Constraint and returns the result or null if the string is not a valid representation of a constraint.