ULongRange

class ULongRange(start: ULong, endInclusive: ULong) : ULongProgression, ClosedRange<ULong>

A range of values of type ULong.

Since Kotlin

1.5

Constructors

ULongRange
Link copied to clipboard
fun ULongRange(start: ULong, endInclusive: ULong)

Types

Companion
Link copied to clipboard
object Companion

Functions

contains
Link copied to clipboard
open operator override fun contains(value: ULong): Boolean
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
isEmpty
Link copied to clipboard
open override fun isEmpty(): Boolean

Checks if the progression is empty.

iterator
Link copied to clipboard
operator override fun iterator(): Iterator<ULong>
toString
Link copied to clipboard
open override fun toString(): String

Properties

endInclusive
Link copied to clipboard
open override val endInclusive: ULong
first
Link copied to clipboard
val first: ULong

The first element in the progression.

last
Link copied to clipboard
val last: ULong

The last element in the progression.

start
Link copied to clipboard
open override val start: ULong
step
Link copied to clipboard
val step: Long

The step of the progression.

Extensions

contains
Link copied to clipboard
inline operator fun ULongRange.contains(element: ULong?): Boolean

Returns true if this range contains the specified element.

operator fun ULongRange.contains(value: UByte): Boolean
operator fun ULongRange.contains(value: UInt): Boolean
operator fun ULongRange.contains(value: UShort): Boolean

Checks if the specified value belongs to this range.

random
Link copied to clipboard
inline fun ULongRange.random(): ULong

Returns a random element from this range.

fun ULongRange.random(random: Random): ULong

Returns a random element from this range using the specified source of randomness.

randomOrNull
Link copied to clipboard
inline fun ULongRange.randomOrNull(): ULong?

Returns a random element from this range, or null if this range is empty.

fun ULongRange.randomOrNull(random: Random): ULong?

Returns a random element from this range using the specified source of randomness, or null if this range is empty.