Scoop API

scoop:scoop.core:0.1.0

ArrayList

class ArrayList

source · line 5
public
public class ArrayList<T> public constructor(initialCapacity: Long = 0L) : MutableList<T>

A growable indexed list. Appending grows storage geometrically; insertion and removal shift later elements. Clearing releases references in occupied slots.

function iterator

source · line 175
public
public override operator fun iterator(): Iterator<T>

Traverses the elements in index order and remains exhausted after reaching the end.

function toMutableArray

source · line 158
public
public fun toMutableArray(): MutableArray<T>

Copies the initialized elements into independent mutable array slots.

function removeAt

source · line 110
public
public override fun removeAt(index: Long): T

Removes and returns the indexed element, shifts later elements, and releases the vacated slot.

function add

source · line 79
public
public override fun add(value: T): Unit
  • Overrides add · MutableList

Appends an element or inserts it at the supplied index. Indexed insertion shifts later elements.

function toArray

source · line 143
public
public fun toArray(): Array<T>

Copies the initialized elements into independent immutable array slots.

function clear

source · line 131
public
public override fun clear(): Unit
  • Overrides clear · MutableList

Releases all occupied element slots and sets the size to zero.