contains
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
operator fun IntRange.contains(element: Int?): Boolean
operator fun LongRange.contains(element: Long?): Boolean
operator fun CharRange.contains(element: Char?): Boolean
operator fun UIntRange.contains(element: UInt?): Boolean
operator fun ULongRange.contains(element: ULong?): Boolean
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
@JvmName("intRangeContains") operator fun ClosedRange<Int>.contains( value: Byte ): Boolean
@JvmName("longRangeContains") operator fun ClosedRange<Long>.contains( value: Byte ): Boolean
@JvmName("shortRangeContains") operator fun ClosedRange<Short>.contains( value: Byte ): Boolean
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("doubleRangeContains") operator fun ClosedRange<Double>.contains( value: Byte ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("floatRangeContains") operator fun ClosedRange<Float>.contains( value: Byte ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("intRangeContains") operator fun ClosedRange<Int>.contains( value: Double ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("longRangeContains") operator fun ClosedRange<Long>.contains( value: Double ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("byteRangeContains") operator fun ClosedRange<Byte>.contains( value: Double ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("shortRangeContains") operator fun ClosedRange<Short>.contains( value: Double ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@JvmName("floatRangeContains") operator fun ClosedRange<Float>.contains( value: Double ): Boolean
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("intRangeContains") operator fun ClosedRange<Int>.contains( value: Float ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("longRangeContains") operator fun ClosedRange<Long>.contains( value: Float ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("byteRangeContains") operator fun ClosedRange<Byte>.contains( value: Float ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("shortRangeContains") operator fun ClosedRange<Short>.contains( value: Float ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@JvmName("doubleRangeContains") operator fun ClosedRange<Double>.contains( value: Float ): Boolean
@JvmName("longRangeContains") operator fun ClosedRange<Long>.contains( value: Int ): Boolean
@JvmName("byteRangeContains") operator fun ClosedRange<Byte>.contains( value: Int ): Boolean
@JvmName("shortRangeContains") operator fun ClosedRange<Short>.contains( value: Int ): Boolean
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("doubleRangeContains") operator fun ClosedRange<Double>.contains( value: Int ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("floatRangeContains") operator fun ClosedRange<Float>.contains( value: Int ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@JvmName("intRangeContains") operator fun ClosedRange<Int>.contains( value: Long ): Boolean
@JvmName("byteRangeContains") operator fun ClosedRange<Byte>.contains( value: Long ): Boolean
@JvmName("shortRangeContains") operator fun ClosedRange<Short>.contains( value: Long ): Boolean
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("doubleRangeContains") operator fun ClosedRange<Double>.contains( value: Long ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("floatRangeContains") operator fun ClosedRange<Float>.contains( value: Long ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@JvmName("intRangeContains") operator fun ClosedRange<Int>.contains( value: Short ): Boolean
@JvmName("longRangeContains") operator fun ClosedRange<Long>.contains( value: Short ): Boolean
@JvmName("byteRangeContains") operator fun ClosedRange<Byte>.contains( value: Short ): Boolean
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("doubleRangeContains") operator fun ClosedRange<Double>.contains( value: Short ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
@DeprecatedSinceKotlin("1.3", "1.4", "1.5") @JvmName("floatRangeContains") operator fun ClosedRange<Float>.contains( value: Short ): BooleanDeprecated: This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
operator fun UIntRange.contains(value: UByte): Boolean
operator fun ULongRange.contains(value: UByte): Boolean
operator fun ULongRange.contains(value: UInt): Boolean
operator fun UIntRange.contains(value: ULong): Boolean
operator fun UIntRange.contains(value: UShort): Boolean
operator fun ULongRange.contains(value: UShort): Boolean
Checks if the specified value belongs to this range.
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
operator fun <T : Any, R> R.contains( element: T? ): Boolean where R : Iterable<T>, R : ClosedRange<T>
© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.ranges/contains.html