Lists<E> extension

Provides functions for working with Lists.

Most functions modify a list in-place rather than produce a new list.

on

Methods

containsAll(Iterable<Object?> other) bool
Whether this list contains all elements in other.
removeAll(Iterable<Object?> other) → void
Removes all elements that are present in both this list and other.
replaceAll(void function(Consume<E> add, E element)) → void
Replaces elements using function.
retainAll(Iterable<Object?> other) → void
Retains all elements that are present in both this list and other.
swap(int a, int b) → void
Swaps the elements at the given indexes in-place.

Operators

operator *(int times) List<E>
Repeats this list the give number of times.