Package-level declarations
/docs/reference/ranges.html, Progressions and related top-level and extension functions.
Types
A range of values of type Char
.
Represents a range of floating point numbers. Extends ClosedRange interface providing custom operation lessThanOrEquals for comparing values of range domain type.
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.
A range of values of type Int
.
A range of values of type Long
.
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.
A range of values of type UInt
.
A progression of values of type ULong
.
A range of values of type ULong
.
Functions
Ensures that this value is not less than the specified minimumValue.
Ensures that this value is not less than the specified minimumValue.
Ensures that this value is not greater than the specified maximumValue.
Ensures that this value is not greater than the specified maximumValue.
Ensures that this value lies in the specified range.
Ensures that this value lies in the specified range.
Ensures that this value lies in the specified range.
Ensures that this value lies in the specified range minimumValue..maximumValue.
Ensures that this value lies in the specified range minimumValue..maximumValue.
Returns true
if this iterable range contains the specified element.
Returns true
if this iterable range contains the specified element.
Returns true
if this range contains the specified element.
Checks if the specified value belongs to this range.
Checks if the specified value belongs to this range.
Checks if the specified value belongs to this range.
Returns true
if this range contains the specified element.
Returns the first element.
Returns the first element, or null
if the progression is empty.
Returns the last element.
Returns the last element, or null
if the progression is empty.
Returns a random element from this range.
Returns a random element from this range.
Returns a random element from this range using the specified source of randomness.
Returns a random element from this range using the specified source of randomness.
Returns a random element from this range, or null
if this range is empty.
Returns a random element from this range, or null
if this range is empty.
Returns a random element from this range using the specified source of randomness, or null
if this range is empty.
Returns a random element from this range using the specified source of randomness, or null
if this range is empty.
Creates a range from this Comparable value to the specified that value.
Creates an open-ended range from this Comparable value to the specified that value.
Returns a progression that goes over the same range in the opposite direction with the same step.
Returns a progression that goes over the same range in the opposite direction with the same step.
Returns a progression that goes over the same range with the given step.
Returns a progression that goes over the same range with the given step.