AbstractMutableList

abstract class AbstractMutableList<E> : MutableList<E>

Provides a skeletal implementation of the MutableList interface.

abstract class AbstractMutableList<E> : AbstractList<E> , MutableList<E>

Provides a skeletal implementation of the MutableList interface.

Since Kotlin

1.1
abstract class AbstractMutableList<E> : AbstractMutableCollection<E> , MutableList<E>

Provides a skeletal implementation of the MutableList interface.

abstract class AbstractMutableList<E> : AbstractMutableCollection<E> , MutableList<E>

Provides a skeletal implementation of the MutableList interface.

Parameters

E

the type of elements contained in the list. The list is invariant in its element type.

E

the type of elements contained in the list. The list is invariant in its element type.

E

the type of elements contained in the list. The list is invariant in its element type.

E

the type of elements contained in the list. The list is invariant in its element type.

Functions

add
Link copied to clipboard
open override fun add(element: E): Boolean
open override fun add(element: E): Boolean
open override fun add(element: E): Boolean
abstract override fun add(element: E): Boolean

Adds the specified element to the end of this list.

abstract override fun add(index: Int, element: E)

Inserts an element into the list at the specified index.

JS
abstract override fun add(index: Int, element: E)

Inserts an element into the list at the specified index.

Native
abstract override fun add(index: Int, element: E)

Inserts an element into the list at the specified index.

Common
abstract fun add(index: Int, element: E)
addAll
Link copied to clipboard
Common
open override fun addAll(elements: Collection<E>): Boolean
open override fun addAll(index: Int, elements: Collection<E>): Boolean
abstract override fun addAll(elements: Collection<E>): Boolean

Adds all of the elements of the specified collection to the end of this list.

open override fun addAll(index: Int, elements: Collection<E>): Boolean
open override fun addAll(index: Int, elements: Collection<E>): Boolean

Inserts all of the elements of the specified collection elements into this list at the specified index.

abstract fun addAll(index: Int, elements: Collection<E>): Boolean

Inserts all of the elements of the specified collection elements into this list at the specified index.

clear
Link copied to clipboard
Common
open override fun clear()
open override fun clear()
open override fun clear()
abstract override fun clear()

Removes all elements from this collection.

contains
Link copied to clipboard
Common
open operator override fun contains(element: @UnsafeVariance E): Boolean
open operator override fun contains(element: E): Boolean
open operator override fun contains(element: E): Boolean
abstract operator override fun contains(element: E): Boolean

Checks if the specified element is contained in this collection.

containsAll
Link copied to clipboard
open override fun containsAll(elements: Collection<E>): Boolean
abstract fun containsAll(elements: Collection<E>): Boolean
abstract override fun containsAll(elements: Collection<E>): Boolean

Checks if all elements in the specified collection are contained in this collection.

Common
open override fun containsAll(elements: Collection<@UnsafeVariance E>): Boolean
equals
Link copied to clipboard
JS
open operator override fun equals(other: Any?): Boolean

Compares this list with another list instance with the ordered structural equality.

Native
open operator override fun equals(other: Any?): Boolean
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in E>)
get
Link copied to clipboard
Common
abstract operator fun get(index: Int): E
abstract operator fun get(index: Int): E
abstract operator fun get(index: Int): E
abstract operator fun get(index: Int): E

Returns the element at the specified index in the list.

hashCode
Link copied to clipboard
JS
open override fun hashCode(): Int

Returns the hash code value for this list.

Native
open override fun hashCode(): Int
indexOf
Link copied to clipboard
Common
open override fun indexOf(element: @UnsafeVariance E): Int
open override fun indexOf(element: E): Int
open override fun indexOf(element: E): Int
abstract fun indexOf(element: E): Int

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.

isEmpty
Link copied to clipboard
open override fun isEmpty(): Boolean
abstract fun isEmpty(): Boolean
abstract override fun isEmpty(): Boolean

Returns true if the collection is empty (contains no elements), false otherwise.

Common
open override fun isEmpty(): Boolean
iterator
Link copied to clipboard
Common
open operator override fun iterator(): MutableIterator<E>
open operator override fun iterator(): MutableIterator<E>
open operator override fun iterator(): MutableIterator<E>
abstract operator override fun iterator(): Iterator<E>

Returns an iterator over the elements of this object.

lastIndexOf
Link copied to clipboard
Common
open override fun lastIndexOf(element: @UnsafeVariance E): Int
open override fun lastIndexOf(element: E): Int
open override fun lastIndexOf(element: E): Int
abstract fun lastIndexOf(element: E): Int

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.

listIterator
Link copied to clipboard
Common
open override fun listIterator(): MutableListIterator<E>
open override fun listIterator(index: Int): MutableListIterator<E>
open override fun listIterator(): MutableListIterator<E>
open override fun listIterator(): MutableListIterator<E>
abstract override fun listIterator(): MutableListIterator<E>

Returns a list iterator over the elements in this list (in proper sequence).

open override fun listIterator(index: Int): MutableListIterator<E>
open override fun listIterator(index: Int): MutableListIterator<E>

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified index.

abstract override fun listIterator(index: Int): MutableListIterator<E>

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified index.

parallelStream
Link copied to clipboard
open fun parallelStream(): Stream<E>
remove
Link copied to clipboard
Common
open override fun remove(element: E): Boolean
abstract override fun remove(element: E): Boolean

Removes a single instance of the specified element from this collection, if it is present.

removeAll
Link copied to clipboard
Common
open override fun removeAll(elements: Collection<E>): Boolean
open override fun removeAll(elements: Collection<E>): Boolean
open override fun removeAll(elements: Collection<E>): Boolean
abstract override fun removeAll(elements: Collection<E>): Boolean

Removes all of this collection's elements that are also contained in the specified collection.

removeAt
Link copied to clipboard
abstract override fun removeAt(index: Int): E

Removes an element at the specified index from the list.

JS
abstract override fun removeAt(index: Int): E

Removes an element at the specified index from the list.

Native
abstract override fun removeAt(index: Int): E

Removes an element at the specified index from the list.

Common
abstract fun removeAt(index: Int): E
removeIf
Link copied to clipboard
open fun removeIf(p0: Predicate<in E>): Boolean
removeRange
Link copied to clipboard
open fun removeRange(p0: Int, p1: Int)
replaceAll
Link copied to clipboard
open fun replaceAll(p0: UnaryOperator<E>)
retainAll
Link copied to clipboard
Common
open override fun retainAll(elements: Collection<E>): Boolean
open override fun retainAll(elements: Collection<E>): Boolean
open override fun retainAll(elements: Collection<E>): Boolean
abstract override fun retainAll(elements: Collection<E>): Boolean

Retains only the elements in this collection that are contained in the specified collection.

set
Link copied to clipboard
abstract operator override fun set(index: Int, element: E): E
abstract operator override fun set(index: Int, element: E): E
abstract operator override fun set(index: Int, element: E): E

Replaces the element at the specified position in this list with the specified element.

Common
abstract operator fun set(index: Int, element: E): E
sort
Link copied to clipboard
open fun sort(p0: Comparator<in E>)
spliterator
Link copied to clipboard
open override fun spliterator(): Spliterator<E>
stream
Link copied to clipboard
open fun stream(): Stream<E>
subList
Link copied to clipboard
Common
open override fun subList(fromIndex: Int, toIndex: Int): MutableList<E>
open override fun subList(fromIndex: Int, toIndex: Int): MutableList<E>
open override fun subList(fromIndex: Int, toIndex: Int): MutableList<E>

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.

abstract override fun subList(fromIndex: Int, toIndex: Int): MutableList<E>

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.

toArray
Link copied to clipboard
open fun toArray(): Array<Any>
open fun <T : Any> toArray(p0: Array<T>): Array<T>
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>
toJSON
Link copied to clipboard
JS
open fun toJSON(): Any
toString
Link copied to clipboard
JS
open override fun toString(): String

Properties

modCount
Link copied to clipboard
val modCount: Int
size
Link copied to clipboard
Common
abstract override val size: Int
size
Link copied to clipboard
abstract override val size: Int

Returns the size of the collection.

size
Link copied to clipboard
JS
abstract override val size: Int

Returns the size of the collection.

size
Link copied to clipboard
Native
abstract val size: Int

Returns the size of the collection.

Inheritors

ArrayDeque
Link copied to clipboard
ArrayList
Link copied to clipboard