AbstractMutableList

expect abstract class AbstractMutableList<E> : MutableList<E>

Provides a skeletal implementation of the MutableList interface.

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

Provides a skeletal implementation of the MutableList interface.

Since Kotlin

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

Provides a skeletal implementation of the MutableList interface.

actual 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
expect open override fun add(element: E): Boolean

Adds the specified element to the end of this list.

abstract fun add(index: Int, element: E)
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.

actual open 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.

actual open 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.

addAll
Link copied to clipboard
expect open override fun addAll(elements: Collection<E>): Boolean
expect 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.

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.

actual 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.

actual 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.

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

Removes all elements from this collection.

actual open override fun clear()

Removes all elements from this collection.

actual open override fun clear()

Removes all elements from this collection.

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

Checks if the specified element is contained in this collection.

actual open operator override fun contains(element: E): Boolean

Checks if the specified element is contained in this collection.

actual open operator override fun contains(element: E): Boolean

Checks if the specified element is contained in this collection.

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

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

open override fun containsAll(elements: Collection<E>): Boolean

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

abstract fun containsAll(elements: Collection<E>): Boolean

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

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

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

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
abstract operator fun get(index: Int): E
abstract operator fun get(index: Int): E

Returns the element at the specified index in the list.

abstract operator fun get(index: Int): E

Returns the element at the specified index in the list.

abstract operator fun get(index: Int): E

Returns the element at the specified index in the list.

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

Returns the hash code value for this list.

open override fun hashCode(): Int
indexOf
Link copied to clipboard
expect open override fun indexOf(element: @UnsafeVariance 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.

actual open override 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.

actual open override 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
expect open override fun isEmpty(): Boolean
abstract override fun isEmpty(): Boolean

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

open override fun isEmpty(): Boolean

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

abstract fun isEmpty(): Boolean

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

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

Returns an iterator over the elements of this object.

actual open operator override fun iterator(): MutableIterator<E>

Returns an iterator over the elements of this object.

actual open operator override fun iterator(): MutableIterator<E>

Returns an iterator over the elements of this object.

lastIndexOf
Link copied to clipboard
expect open override fun lastIndexOf(element: @UnsafeVariance 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.

actual open override 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.

actual open override 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
expect open override fun listIterator(): MutableListIterator<E>
expect open override fun listIterator(index: Int): MutableListIterator<E>
abstract override fun listIterator(): MutableListIterator<E>

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

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.

actual open override fun listIterator(): MutableListIterator<E>

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

actual 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.

actual open override fun listIterator(): MutableListIterator<E>

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

actual 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.

parallelStream
Link copied to clipboard
open fun parallelStream(): Stream<E>
remove
Link copied to clipboard
expect 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
expect 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.

actual open override fun removeAll(elements: Collection<E>): Boolean

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

actual open 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 fun removeAt(index: Int): E
abstract override fun removeAt(index: Int): E

Removes an element at the specified index from the list.

abstract override fun removeAt(index: Int): E

Removes an element at the specified index from the list.

abstract override fun removeAt(index: Int): E

Removes an element at the specified index from the list.

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
expect 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.

actual open override fun retainAll(elements: Collection<E>): Boolean

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

actual open 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 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.

abstract operator override fun set(index: Int, element: E): E

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

abstract operator override fun set(index: Int, element: E): E

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

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
expect open override fun subList(fromIndex: Int, toIndex: Int): MutableList<E>
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.

actual 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.

actual 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.

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
open fun toJSON(): Any
toString
Link copied to clipboard
open override fun toString(): String

Properties

modCount
Link copied to clipboard
val modCount: Int
size
Link copied to clipboard
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
abstract override val size: Int

Returns the size of the collection.

size
Link copied to clipboard
abstract val size: Int

Returns the size of the collection.

Inheritors

ArrayDeque
Link copied to clipboard
ArrayList
Link copied to clipboard