kotlin-range-sets / com.github.jonpeterson.kotlin.ranges / RangeSet / containsValue

containsValue

fun containsValue(value: T): Boolean (source)

Checks if the specified value is present in the set.

Examples:

assert(IntRangeSet(listOf(5..8, 11..16)).contains(6) == true)
assert(IntRangeSet(listOf(5..8, 11..16)).contains(9) == false)


Parameters

value - value to determine presence of

Return
whether the value is contained within the set