KtMutableCollection<T> class Null safety

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

@param E the type of elements contained in the collection. The mutable collection is invariant on its element type.

Implemented types
Available Extensions




hashCode int
The hash code for this object. [...]
read-only, inherited
iter Iterable<T>
Access to a Iterable to be used in for-loops
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int
Returns the size of the collection.
read-only, inherited


add(T element) bool
Adds the specified element to the collection. [...]
addAll(KtIterable<T> elements) bool
Adds all of the elements in the specified collection to this collection. [...]
clear() → void
Removes all elements from this collection.
contains(T element) bool
Checks if the specified element is contained in this collection.
containsAll(KtCollection<T> elements) bool
Checks if all elements in the specified collection are contained in this collection.
isEmpty() bool
Returns true if the collection is empty (contains no elements), false otherwise.
iterator() KtMutableIterator<T>
Returns an iterator over the elements of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
remove(T element) bool
Removes a single instance of the specified element from this collection, if it is present. [...]
removeAll(KtIterable<T> elements) bool
Removes all of this collection's elements that are also contained in the specified collection. [...]
retainAll(KtIterable<T> elements) bool
Retains only the elements in this collection that are contained in the specified collection. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]