class LongRange
source · line 142public
public class LongRange internal constructor(
private val first: Long,
private val endpoint: Long,
private val stride: Long,
private val descending: Boolean,
private val inclusive: Boolean
) : Iterable<Long>, Contains<Long>
- Supertype
Iterable<Long> - Supertype
Contains<Long>
An integer progression with a fixed direction, positive step, and inclusive or exclusive endpoint. Iteration checks the endpoint before arithmetic can wrap.
function step
source · line 159public
public infix fun step(value: Long): LongRange
Returns a progression with the requested positive step magnitude, preserving direction and endpoint policy. Zero or negative signed steps are invalid.
parameter value
source · line 159public
value: Long
function contains
source · line 169public
public override operator fun contains(value: Long): Boolean
- Overrides
contains· Contains
Tests membership using both endpoint bounds and alignment with the progression step.
parameter value
source · line 169public
value: Long
function iterator
source · line 152public
public override operator fun iterator(): Iterator<Long>
- Overrides
iterator· Iterable
Creates a fresh cursor over this progression.