satisfiedByAny

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

Samples

import io.github.z4kn4fein.semver.constraints.Constraint
import io.github.z4kn4fein.semver.constraints.ConstraintSerializer
import io.github.z4kn4fein.semver.constraints.satisfiedBy
import io.github.z4kn4fein.semver.constraints.satisfiedByAll
import io.github.z4kn4fein.semver.constraints.satisfiedByAny
import io.github.z4kn4fein.semver.constraints.toConstraint
import io.github.z4kn4fein.semver.constraints.toConstraintOrNull
import io.github.z4kn4fein.semver.toVersion
import kotlinx.serialization.json.Json

fun main() { 
   //sampleStart 
   val constraint = ">=1.1.0".toConstraint()
val versions = listOf("1.1.0", "1.0.0").map { it.toVersion() }
print("$constraint satisfied by ${versions.joinToString(" or ")}? ${constraint satisfiedByAny versions}") 
   //sampleEnd
}