View on GitHub

SpheroidScript

//Spheroid Script/spheroid.collections/MutableList

MutableList

A generic ordered collection of elements that supports adding and removing elements.

interface MutableList<E : Any?> : List, MutableCollection

Functions

Name Summary
add Adds the specified element to the collection.
fun add(element: E): Boolean
clear Removes all elements from this collection.
fun clear()
contains operator fun contains(element: E): Boolean
get Returns the element at the specified index in the list.
operator fun get(index: Long): E
isEmpty fun isEmpty(): Boolean
remove Removes a single instance of the specified element from this collection, if it is present.
fun remove(element: E): Boolean
set Replaces the element at the specified position in this list with the specified element.
operator fun set(index: Long, element: E): E
toString fun toString(): String

Properties

Name Summary
size val size: Long