ObjListExt<E> extension

on

Properties

first ← E

Available on Obj<List<E>>, provided by the ObjListExt extension

The first element of the list.
no getter
last ← E

Available on Obj<List<E>>, provided by the ObjListExt extension

The last element of the list.
no getter
length int

Available on Obj<List<E>>, provided by the ObjListExt extension

The number of objects in this list.
getter/setter pair
reversed Iterable<E>

Available on Obj<List<E>>, provided by the ObjListExt extension

An Iterable of the objects in this list in reverse order.
no setter

Methods

add(E valueToAdd) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Adds value to the end of this list, extending the length by one.
addAll(Iterable<E> iterable) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Appends all objects of iterable to the end of this list.
asMap() Map<int, E>

Available on Obj<List<E>>, provided by the ObjListExt extension

An unmodifiable Map view of this list.
cast<R>() List<R>

Available on Obj<List<E>>, provided by the ObjListExt extension

Returns a view of this list as a list of R instances.
clear() → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes all objects from this list; the length of the list becomes zero.
fillRange(int start, int end, [E? fillValue]) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Overwrites a range of elements with fillValue.
getRange(int start, int end) Iterable<E>

Available on Obj<List<E>>, provided by the ObjListExt extension

Creates an Iterable that iterates over a range of elements.
indexOf(E element, [int start = 0]) int

Available on Obj<List<E>>, provided by the ObjListExt extension

The first index of element in this list.
indexWhere(bool test(E element), [int start = 0]) int

Available on Obj<List<E>>, provided by the ObjListExt extension

The first index in the list that satisfies the provided test.
insert(int index, E element) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Inserts element at position index in this list.
insertAll(int index, Iterable<E> iterable) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Inserts all objects of iterable at position index in this list.
lastIndexOf(E element, [int? start]) int

Available on Obj<List<E>>, provided by the ObjListExt extension

The last index of element in this list.
lastIndexWhere(bool test(E element), [int? start]) int

Available on Obj<List<E>>, provided by the ObjListExt extension

The last index in the list that satisfies the provided test.
remove(Object? valueToRemove) bool

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes the first occurrence of value from this list.
removeAt(int index) → E

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes the object at position index from this list.
removeLast() → E

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes and returns the last object in this list.
removeRange(int start, int end) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes a range of elements from the list.
removeWhere(bool test(E element)) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes all objects from this list that satisfy test.
replaceRange(int start, int end, Iterable<E> replacements) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Replaces a range of elements with the elements of replacements.
retainWhere(bool test(E element)) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Removes all objects from this list that fail to satisfy test.
setAll(int index, Iterable<E> iterable) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Overwrites elements with the objects of iterable.
setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Writes some elements of iterable into a range of this list.
shuffle([Random? random]) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Shuffles the elements of this list randomly.
sort([int compare(E a, E b)?]) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Sorts this list according to the order specified by the compare function.
sublist(int start, [int? end]) List<E>

Available on Obj<List<E>>, provided by the ObjListExt extension

Returns a new list containing the elements between start and end.

Operators

operator +(Obj<List<E>> other) Obj<List<E>>

Available on Obj<List<E>>, provided by the ObjListExt extension

Returns the concatenation of this list and other.
operator [](int index) → E

Available on Obj<List<E>>, provided by the ObjListExt extension

The object at the given index in the list.
operator []=(int index, E valueToSet) → void

Available on Obj<List<E>>, provided by the ObjListExt extension

Sets the value at the given index in the list to value.