View on GitHub

SpheroidScript

//Spheroid Script/spheroid.collections

Package spheroid.collections

Types

Name Summary
Collection A generic collection of elements. Methods in this interface support only read-only access to the collection; read/write access is supported through the MutableCollection interface.
interface Collection<E : Any?> : Iterable
Iterable Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over and that supports removing elements during iteration.
interface Iterable<T : Any?>
List A generic ordered collection of elements. Methods in this interface support only read-only access to the list; read/write access is supported through the MutableList interface.
interface List<E : Any?> : Collection
MutableCollection A generic collection of elements that supports adding and removing elements.
interface MutableCollection<E : Any?> : Collection
MutableList A generic ordered collection of elements that supports adding and removing elements.
interface MutableList<E : Any?> : List, MutableCollection
MutableSet A generic unordered collection of elements that does not support duplicate elements, and supports adding and removing elements.
interface MutableSet<E : Any?> : Set, MutableCollection
Set A generic unordered collection of elements that does not support duplicate elements. Methods in this interface support only read-only access to the set; read/write access is supported through the MutableSet interface.
interface Set<E : Any?> : Collection

Functions

Name Summary
listOf Returns a new read-only list of given elements.
fun <T : Any?> listOf(vararg elements: Array<Out T>): List<T>
mutableListOf Returns a new MutableList with the given elements.
fun <T : Any?> mutableListOf(vararg elements: Array<Out T>): MutableList<T>
mutableSetOf Returns a new MutableSet with the given elements. Elements of the set are iterated in the order they were specified.
fun <T : Any?> mutableSetOf(vararg elements: Array<Out T>): MutableSet<T>
setOf Returns a new read-only set with the given elements. Elements of the set are iterated in the order they were specified.
fun <T : Any?> setOf(vararg elements: Array<Out T>): Set<T>