MutableList
A generic ordered collection of elements that supports adding and removing elements.
Since Kotlin
1.0A generic ordered collection of elements that supports adding and removing elements.
Since Kotlin
1.1Parameters
the type of elements contained in the list. The mutable list is invariant in its element type.
the type of elements contained in the list. The mutable list is invariant in its element type.
Functions
Adds the specified element to the end of this list.
Inserts an element into the list at the specified index.
Adds all of the elements of the specified collection to the end of this list.
Inserts all of the elements of the specified collection elements into this list at the specified index.
Checks if all elements in the specified collection are contained in this collection.
Checks if all elements in the specified collection are contained in this collection.
Returns the index of the first occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.
Returns the index of the last occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.
Returns the index of the last occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.
Returns a list iterator over the elements in this list (in proper sequence).
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified index.
Returns a list iterator over the elements in this list (in proper sequence).
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified index.
Removes a single instance of the specified element from this collection, if it is present.
Removes all of this collection's elements that are also contained in the specified collection.
Removes all of this collection's elements that are also contained in the specified collection.
Retains only the elements in this collection that are contained in the specified collection.
Retains only the elements in this collection that are contained in the specified collection.
Replaces the element at the specified position in this list with the specified element.
Returns a view of the portion of this list between the specified fromIndex (inclusive) and toIndex (exclusive). The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa.
Properties
Extensions
Appends all elements that are instances of specified class to the given destination.
Returns a new SortedSet of all elements.