ClosedRange

kotlin-stdlib / kotlin.ranges / ClosedRange
 

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) 

interface ClosedRange<T : Comparable<T>> 
 Represents a range of values (for example, numbers or characters) where both the lower and upper bounds are included in the range. See the Kotlin language documentation for more information. 
 Properties 

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) endInclusive  The maximum value in the range (inclusive). 
abstract val endInclusive: T 
  
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) start  The minimum value in the range. 
abstract val start: T 
   Functions 

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) contains  Checks whether the specified value belongs to the range. 
open operator fun contains(value: T): Boolean 
  
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) isEmpty  Checks whether the range is empty. 
open fun isEmpty(): Boolean 
   Extension Functions 

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) contains  Checks if the specified value belongs to this range. 
operator fun ClosedRange<Int>.contains(value: Byte): Boolean 

operator fun ClosedRange<Long>.contains(value: Byte): Boolean 

operator fun ClosedRange<Short>.contains(
    value: Byte
): Boolean 

operator fun ClosedRange<Double>.contains(
    value: Byte
): Boolean 

operator fun ClosedRange<Float>.contains(
    value: Byte
): Boolean 

operator fun ClosedRange<Int>.contains(
    value: Double
): Boolean 

operator fun ClosedRange<Long>.contains(
    value: Double
): Boolean 

operator fun ClosedRange<Byte>.contains(
    value: Double
): Boolean 

operator fun ClosedRange<Short>.contains(
    value: Double
): Boolean 

operator fun ClosedRange<Float>.contains(
    value: Double
): Boolean 

operator fun ClosedRange<Int>.contains(value: Float): Boolean 

operator fun ClosedRange<Long>.contains(
    value: Float
): Boolean 

operator fun ClosedRange<Byte>.contains(
    value: Float
): Boolean 

operator fun ClosedRange<Short>.contains(
    value: Float
): Boolean 

operator fun ClosedRange<Double>.contains(
    value: Float
): Boolean 

operator fun ClosedRange<Long>.contains(value: Int): Boolean 

operator fun ClosedRange<Byte>.contains(value: Int): Boolean 

operator fun ClosedRange<Short>.contains(value: Int): Boolean 

operator fun ClosedRange<Double>.contains(
    value: Int
): Boolean 

operator fun ClosedRange<Float>.contains(value: Int): Boolean 

operator fun ClosedRange<Int>.contains(value: Long): Boolean 

operator fun ClosedRange<Byte>.contains(value: Long): Boolean 

operator fun ClosedRange<Short>.contains(
    value: Long
): Boolean 

operator fun ClosedRange<Double>.contains(
    value: Long
): Boolean 

operator fun ClosedRange<Float>.contains(
    value: Long
): Boolean 

operator fun ClosedRange<Int>.contains(value: Short): Boolean 

operator fun ClosedRange<Long>.contains(
    value: Short
): Boolean 

operator fun ClosedRange<Byte>.contains(
    value: Short
): Boolean 

operator fun ClosedRange<Double>.contains(
    value: Short
): Boolean 

operator fun ClosedRange<Float>.contains(
    value: Short
): Boolean 
   Inheritors 

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) CharRange  A range of values of type Char. 
class CharRange : 
    CharProgression, 
    ClosedRange<Char>, 
    OpenEndRange<Char> 
  
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1) ClosedFloatingPointRange  Represents a range of floating point numbers. Extends ClosedRange interface providing custom operation lessThanOrEquals for comparing values of range domain type. 
interface ClosedFloatingPointRange<T : Comparable<T>> : 
    ClosedRange<T> 
  
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) IntRange  A range of values of type Int. 
class IntRange : 
    IntProgression, 
    ClosedRange<Int>, 
    OpenEndRange<Int> 
  
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0) LongRange  A range of values of type Long. 
class LongRange : 
    LongProgression, 
    ClosedRange<Long>, 
    OpenEndRange<Long> 
  
Platform and version requirements: JVM (1.5), JS (1.5), Native (1.5) UIntRange  A range of values of type UInt. 
class UIntRange : 
    UIntProgression, 
    ClosedRange<UInt>, 
    OpenEndRange<UInt> 
  
Platform and version requirements: JVM (1.5), JS (1.5), Native (1.5) ULongRange  A range of values of type ULong. 
class ULongRange : 
    ULongProgression, 
    ClosedRange<ULong>, 
    OpenEndRange<ULong> 
  

    
{'path': 'public/docs/kotlin~1.7/api/latest/jvm/stdlib/kotlin.ranges/-closed-range/index.html', 'source': 'DevDocs.IO'}