class Array
source · line 6public
public class Array<T> : List<T>
- Supertype
List<T>
A fixed-size array with immutable element slots and zero-based Long indexing. Copy conversion creates independent slots while preserving element values or references.
Extensions
@Unsafe public fun <T : value, R> Array<T>.withDataPointer(block: (Ptr<T>, Long) -> R): R· scoop:scoop.core:0.1.0
function get
source · line 22public
public override operator fun get(index: Long): T
Reads the element at a zero-based index; out-of-range indices throw IndexOutOfBoundsException.
parameter index
source · line 22public
index: Long
type parameter T
source · line 6public
T
function iterator
source · line 33public
public override operator fun iterator(): Iterator<T>
- Overrides
iterator· Iterable
Traverses the elements in index order and remains exhausted after reaching the end.
property size
source · line 13public
public override val size: Long
- Overrides
size
get: public read-only
The current number of element slots visible through the list interface.
getter get
source · line 13public
get(): Long
function toMutableArray
source · line 27public
@Intrinsic("array_to_mutable")
public fun toMutableArray(): MutableArray<T>
Copies the elements into independent mutable array slots.