KtMutableListExtensions<T> extension
Properties
-
dart
→ List<T>
-
Creates a List instance that wraps the original KtList. It acts as a view.
no setter
Methods
-
fill(T value)
→ void
-
Fills the list with the provided
value
.
-
removeFirst()
→ T
-
Removes the first element from this mutable list.
-
removeFirstOrNull()
→ T?
-
Removes the first element from this mutable list.
-
removeLast()
→ T
-
Removes the last element from this mutable list.
-
removeLastOrNull()
→ T?
-
Removes the last element from this mutable list.
-
reverse()
→ void
-
Reverses elements in the list in-place.
-
shuffle([Random? random])
→ void
-
Shuffles elements in the list.
-
sortBy<R extends Comparable>(R selector(T))
→ void
-
Sorts elements in the list in-place according to natural sort order of the value returned by specified
selector
function.
-
sortByDescending<R extends Comparable>(R selector(T))
→ void
-
Sorts elements in the list in-place descending according to natural sort order of the value returned by specified
selector
function.
-
sortWith(Comparator<T> comparator)
→ void
-
Sorts elements in the list in-place according to the specified
comparator
-
swap(int indexA, int indexB)
→ void
-
Swaps the elements at the specified positions in the specified list.
(If the specified positions are equal, invoking this method leaves
the list unchanged.)