Base implementation of a List class.
ListMixin
can be used as a mixin to make a class implement
the List
interface.
This implements all read operations using only the length
and
operator[]
members. It implements write operations using those and
length=
and operator[]=
NOTICE: Forwarding just these four operations to a normal growable List
(as created by new List()
) will give very bad performance for add
and
addAll
operations of ListBase
. These operations are implemented by
increasing the length of the list by one for each add
operation, and
repeatedly increasing the length of a growable list is not efficient.
To avoid this, either override 'add' and 'addAll' to also forward directly
to the growable list, or, if possible, use DelegatingList
from
"package:collection/wrappers.dart" instead.
true
if there are no elements in this collection. [...]
Iterator
that allows iterating the elements of this
Iterable
. [...]
value
to the end of this list,
extending the length by one. [...]
iterable
to the end of this list. [...]
test
. [...]
this
. [...]
R
instances. [...]
element
. [...]
index
th element. [...]
test
. [...]
start
inclusive to end
exclusive
to the given fillValue
. [...]
test
. [...]
other
. [...]
f
to each element of this collection in iteration
order.
start
inclusive to end
exclusive. [...]
element
in this list. [...]
test
. [...]
index
in this list. [...]
iterable
at position index
in this list. [...]
element
in this list. [...]
test
. [...]
test
. [...]
f
on each element of this Iterable
in iteration order. [...]
value
from this list. [...]
index
from this list. [...]
start
inclusive to end
exclusive. [...]
test
. [...]
start
inclusive to end
exclusive
and inserts the contents of replacement
in its place. [...]
test
. [...]
this
with the objects of iterable
, starting
at position index
in this list. [...]
iterable
, skipping skipCount
objects first,
into the range start
, inclusive, to end
, exclusive, of the list. [...]
test
. [...]
count
elements. [...]
Iterable
that skips leading elements while test
is satisfied. [...]
compare
function. [...]
start
and end
. [...]
count
first elements of this iterable. [...]
test
. [...]
test
. [...]
T
. [...]
other
. [...]
index
in the list
or throws a RangeError if index
is out of bounds.
index
in the list to value
or throws a RangeError if index
is out of bounds.