OpenEndRange

Represents a range of values (for example, numbers or characters) where the upper bound is not included in the range. See the Kotlin language documentation for more information.

Since Kotlin

1.9

Inheritors

Properties

Link copied to clipboard
abstract val endExclusive: T

The maximum value in the range (exclusive).

Since Kotlin 1.9
Link copied to clipboard
abstract val start: T

The minimum value in the range.

Since Kotlin 1.9

Functions

Link copied to clipboard
open operator fun contains(value: T): Boolean

Checks whether the specified value belongs to the range.

Since Kotlin 1.9
Link copied to clipboard
@JvmName(name = "byteRangeContains")
operator fun OpenEndRange<Byte>.contains(value: Int): Boolean
@JvmName(name = "byteRangeContains")
operator fun OpenEndRange<Byte>.contains(value: Long): Boolean
@JvmName(name = "byteRangeContains")
operator fun OpenEndRange<Byte>.contains(value: Short): Boolean
@JvmName(name = "doubleRangeContains")
operator fun OpenEndRange<Double>.contains(value: Float): Boolean
@JvmName(name = "intRangeContains")
operator fun OpenEndRange<Int>.contains(value: Byte): Boolean
@JvmName(name = "intRangeContains")
operator fun OpenEndRange<Int>.contains(value: Long): Boolean
@JvmName(name = "intRangeContains")
operator fun OpenEndRange<Int>.contains(value: Short): Boolean
@JvmName(name = "longRangeContains")
operator fun OpenEndRange<Long>.contains(value: Byte): Boolean
@JvmName(name = "longRangeContains")
operator fun OpenEndRange<Long>.contains(value: Int): Boolean
@JvmName(name = "longRangeContains")
operator fun OpenEndRange<Long>.contains(value: Short): Boolean
@JvmName(name = "shortRangeContains")
operator fun OpenEndRange<Short>.contains(value: Byte): Boolean
@JvmName(name = "shortRangeContains")
operator fun OpenEndRange<Short>.contains(value: Int): Boolean
@JvmName(name = "shortRangeContains")
operator fun OpenEndRange<Short>.contains(value: Long): Boolean

Checks if the specified value belongs to this range.

Since Kotlin 1.9
Link copied to clipboard
open fun isEmpty(): Boolean

Checks whether the range is empty.

Since Kotlin 1.9