ClosedRange

Represents a range of values (for example, numbers or characters). See the Kotlin language documentation for more information.

Since Kotlin

1.1

Inheritors

Represents a range of values (for example, numbers or characters). See the Kotlin language documentation for more information.

Since Kotlin

1.0

Inheritors

Properties

Link copied to clipboard
abstract val endInclusive: T

The maximum value in the range (inclusive).

Since Kotlin 1.1
abstract val endInclusive: T

The maximum value in the range (inclusive).

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

The minimum value in the range.

Since Kotlin 1.1
abstract val start: T

The minimum value in the range.

Since Kotlin 1.0

Functions

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

Checks whether the specified value belongs to the range.

Since Kotlin 1.1
open operator fun contains(value: T): Boolean

Checks whether the specified value belongs to the range.

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

Checks if the specified value belongs to this range.

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

Checks whether the range is empty.

Since Kotlin 1.1
open fun isEmpty(): Boolean

Checks whether the range is empty.

Since Kotlin 1.0