SortedList<E> class
- Implemented types
- Available extensions
- EnumByName
- FutureIterable
- InterableMin
- IterableAll
- IterableAppend
- IterableAppendElement
- IterableAssociate
- IterableAssociateBy
- IterableAssociateWith
- IterableAsStream
- IterableAverageBy
- IterableCached
- IterableChunked
- IterableChunkWhile
- IterableContainsAll
- IterableContainsAny
- IterableContentEquals
- IterableCount
- IterableCycle
- IterableDistinct
- IterableDistinctBy
- IterableElementAtOrDefault
- IterableElementAtOrElse
- IterableElementAtOrNull
- IterableExcept
- IterableExceptElement
- IterableExtensions
- IterableFilter
- IterableFilterIndexed
- IterableFilterIndexedTo
- IterableFilterNot
- IterableFilterNotIndexed
- IterableFilterNotNull
- IterableFilterNotTo
- IterableFilterNotToIndexed
- IterableFilterTo
- IterableFirstOrDefault
- IterableFirstOrNull
- IterableFirstOrNullWhere
- IterableFirstWhile
- IterableFlatMap
- IterableForEachIndexed
- IterableFourthItem
- IterableFutureX
- IterableGroupBy
- IterableIntersect
- IterableIterableX
- IterableJoinToString
- IterableLastOrElse
- IterableLastOrNull
- IterableLastOrNullWhere
- IterableLastWhile
- IterableMapIndexed
- IterableMapIndexedNotNull
- IterableMapNotNull
- IterableMax
- IterableMaxBy
- IterableMaxWith
- IterableMinBy
- IterableMinus
- IterableMinWith
- IterableNone
- IterableNumAverageExtension
- IterableNumMedianExtension
- IterableNumSumExtension
- IterableOnEach
- IterablePartition
- IterablePlus
- IterablePrepend
- IterablePrependElement
- IterableReversed
- IterableSecondItem
- IterableShuffled
- IterableSlice
- IterableSorted
- IterableSortedBy
- IterableSortedByDescending
- IterableSortedDescending
- IterableSortedWith
- IterableSplitWhen
- IterableStartsWithExtension
- IterableSumBy
- IterableTakeFirst
- IterableTakeLast
- IterableThirdItem
- IterableToHashSet
- IterableToIterable
- IterableToUnmodifiable
- IterableUnion
- IterableWhereIndexed
- IterableWhereIndexedTo
- IterableWhereNot
- IterableWhereNotIndexed
- IterableWhereNotNull
- IterableWhereNotTo
- IterableWhereNotToIndexed
- IterableWhereTo
- IterableWindowed
- IterableZip
- ListBinarySearchExtension
- ListDropExtension
- ListDropLastExtension
- ListDropLastWhileExtension
- ListDropWhileExtension
- ListElementAtOrNull
- ListExtension
- ListFlattenExtension
- ListIndicesExtension
- ListInsertionSortExtension
- ListLastIndexExtension
- ListLowerBoundExtension
- ListMergeSortExtension
- ListSwapExtension
- ListToJSArray
- MyUtilityExtensionDeepCopyIterable
- MyUtilityExtensionDeepCopyIterableOfMap
- MyUtilityExtensionDeepCopyIterableOfMapWithKeyAndValueMap
- MyUtilityExtensionDeepCopyIterableOfMapWithKeyMap
- MyUtilityExtensionDeepCopyIterableOfMapWithValueMap
- MyUtilityExtensionFileStatPermissionCanExecute
- MyUtilityExtensionFileStatPermissionCanRead
- MyUtilityExtensionFileStatPermissionCanWrite
- MyUtilityExtensionFileStatPermissionOperatorPipe
- MyUtilityExtensionFileStatPermissionToOctalMode
- MyUtilityExtensionIterableGetRandom
- MyUtilityExtensionIterableOperatorSquareBrackets
- MyUtilityExtensionIterableToIndexKeyMap
- MyUtilityExtensionIterableToMap
- NullableIterableExtensions
Constructors
-
SortedList.new(Iterable<
E> _source, Comparator<E> _comparator) -
SortedList.withSelector(Iterable<
E> _source, Comparable selector(E element), int order, Comparator<E> ? parentComparator)
Properties
-
cached
→ Iterable<
E> -
Available on Iterable<
Returns a new lazy Iterable that caches the computation of the current Iterable.E> , provided by the IterableCached extensionno setter - canExecute → bool
-
Available on Iterable<
FileStatPermission> , provided by the MyUtilityExtensionFileStatPermissionCanExecute extensionno setter - canRead → bool
-
Available on Iterable<
FileStatPermission> , provided by the MyUtilityExtensionFileStatPermissionCanRead extensionno setter - canWrite → bool
-
Available on Iterable<
FileStatPermission> , provided by the MyUtilityExtensionFileStatPermissionCanWrite extensionno setter -
delegate
→ List<
E> -
no setter
- first ↔ E
-
The first element.
getter/setter pairinherited
- firstIndex → int
-
Available on List<
Index of the first element or -1 if the collection is empty.E> , provided by the ListExtension extensionno setter - firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnull
if the iterable is empty.no setter - firstOrNull → E?
-
Available on Iterable<
First element orE> , provided by the IterableFirstOrNull extensionnull
if the collection is empty.no setter - fourth → E
-
Available on Iterable<
Fourth element.E> , provided by the IterableFourthItem extensionno setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
indexed
→ Iterable<
(int, T)> -
Available on Iterable<
Pairs of elements of the indices and elements of this iterable.T> , provided by the IterableExtensions extensionno setter -
indices
→ Iterable<
int> -
Available on List<
E> , provided by the ListIndicesExtension extensionno setter - isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
E> -
A new
Iterator
that allows iterating the elements of thisIterable
.no setterinherited - last ↔ E
-
The last element.
getter/setter pairinherited
- lastIndex → int
-
Available on List<
Index of the last element or -1 if the collection is empty.E> , provided by the ListLastIndexExtension extensionno setter - lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnull
if the iterable is empty.no setter - lastOrNull → E?
-
Available on Iterable<
Last element orE> , provided by the IterableLastOrNull extensionnull
if the collection is empty.no setter - length ↔ int
-
The number of elements in this Iterable.
getter/setter pairinherited
-
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnull
elements of this iterable.no setter -
reversed
→ Iterable<
E> -
An Iterable of the objects in this list in reverse order.
no setterinherited
-
reversed
→ Iterable<
E> -
Available on Iterable<
Returns an Iterable of the objects in this list in reverse order.E> , provided by the IterableReversed extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- second → E
-
Available on Iterable<
Second element.E> , provided by the IterableSecondItem extensionno setter - single → E
-
Checks that this iterable has only one element, and returns that element.
no setterinherited
- singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull
.no setter - third → E
-
Available on Iterable<
Third element.E> , provided by the IterableThirdItem extensionno setter -
toJS
→ JSArray<
T> -
Available on List<
Converts this List to a JSArray by either casting, unwrapping, or cloning the List.T> , provided by the ListToJSArray extensionno setter -
toJSProxyOrRef
→ JSArray<
T> -
Available on List<
Converts this List to a JSArray by either casting, unwrapping, or proxying the List.T> , provided by the ListToJSArray extensionno setter -
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter
Methods
-
add(
E value) → void -
Adds
value
to the end of this list, extending the length by one.inherited -
addAll(
Iterable< E> iterable) → void -
Appends all objects of
iterable
to the end of this list.inherited -
all(
bool predicate(E element)) → bool -
Available on Iterable<
Returns true if all elements match the givenE> , provided by the IterableAll extensionpredicate
or if the collection is empty. -
any(
bool test(E element)) → bool -
Checks whether any element of this iterable satisfies
test
.inherited -
append(
Iterable< E> elements) → Iterable<E> -
Available on Iterable<
Returns a new lazy Iterable containing all elements of the givenE> , provided by the IterableAppend extensionelements
collection and then all elements of this collection. -
appendElement(
E element) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable containing the givenE> , provided by the IterableAppendElement extensionelement
and then all elements of this collection. -
asMap(
) → Map< int, E> -
An unmodifiable Map view of this list.
inherited
-
asNameMap(
) → Map< String, T> -
Available on Iterable<
Creates a map from the names of enum values to the values.T> , provided by the EnumByName extension -
associate<
K, V> (MapEntry< K, V> transform(E element)) → Map<K, V> -
Available on Iterable<
Returns a Map containing key-value pairs provided byE> , provided by the IterableAssociate extensiontransform
function applied to elements of this collection. -
associateBy<
K> (K keySelector(E element)) → Map< K, E> -
Available on Iterable<
Returns a Map containing the elements from the collection indexed by the key returned fromE> , provided by the IterableAssociateBy extensionkeySelector
function applied to each element. -
associateWith<
V> (V valueSelector(E element)) → Map< E, V> -
Available on Iterable<
Returns a Map containing the values returned fromE> , provided by the IterableAssociateWith extensionvalueSelector
function applied to each element indexed by the elements from the collection. -
asStream(
) → Stream< E> -
Available on Iterable<
Returns a new Stream with all elements of this collection.E> , provided by the IterableAsStream extension -
asStreamAwaited(
) → Stream< E> -
Available on Iterable<
Create a stream from a group of futures.Future< , provided by the IterableFutureX extensionE> > -
average(
) → double -
Available on Iterable<
Returns the average of all elements in the collection.T> , provided by the IterableNumAverageExtension extension -
averageBy(
num selector(E element)) → double -
Available on Iterable<
Returns the average of values returned byE> , provided by the IterableAverageBy extensionselector
for all elements in the collection. -
binarySearch(
E value, {int compare(E a, E b)?}) → int -
Available on List<
Returns a position of theE> , provided by the ListBinarySearchExtension extensionvalue
in this list, if it is there. -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname
. -
cast<
T> () → List< T> -
A view of this iterable as an iterable of
R
instances. -
chunked(
int size) → Iterable< List< E> > -
Available on Iterable<
Splits this collection into a new lazy Iterable of lists each not exceeding the givenE> , provided by the IterableChunked extensionsize
. -
chunkWhile(
bool predicate(E, E)) → Iterable< List< E> > -
Available on Iterable<
Splits this collection into a lazy Iterable of chunks, where chunks are created as long asE> , provided by the IterableChunkWhile extensionpredicate
is true for a pair of entries. -
clear(
) → void -
Removes all objects from this list; the length of the list becomes zero.
inherited
-
contains(
Object? element) → bool -
Whether the collection contains an element equal to
element
.inherited -
containsAll(
Iterable< E> collection) → bool -
Available on Iterable<
Checks if all elements in the specifiedE> , provided by the IterableContainsAll extensioncollection
are contained in this collection. -
containsAny(
Iterable< E> collection) → bool -
Available on Iterable<
Checks if any elements in the specifiedE> , provided by the IterableContainsAny extensioncollection
are contained in this collection. -
contentEquals(
Iterable< E> other, [bool checkEqual(E a, E b)?]) → bool -
Available on Iterable<
Returns true if this collection is structurally equal to theE> , provided by the IterableContentEquals extensionother
collection. -
count(
[bool predicate(E element)?]) → int -
Available on Iterable<
Returns the number of elements matching the givenE> , provided by the IterableCount extensionpredicate
. -
cycle(
[int? n]) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable which iterates over this collectionE> , provided by the IterableCycle extensionn
times. -
deepCopy(
{bool growable = true}) → List< T> -
Available on Iterable<
Returns a new List that contains a deep copy of every element from this.T> , provided by the MyUtilityExtensionDeepCopyIterable extension -
deepCopy(
{bool growable = true}) → List< Map< Map< >K1, V1> , Map<K2, V2> > -
Available on Iterable<
Returns a new List that contains a deep copy of every element from this.Map< , provided by the MyUtilityExtensionDeepCopyIterableOfMapWithKeyAndValueMap extensionMap< >K1, V1> , Map<K2, V2> > -
deepCopy(
{bool growable = true}) → List< Map< K, V> > -
Available on Iterable<
Returns a new List that contains a deep copy of every element from this.Map< , provided by the MyUtilityExtensionDeepCopyIterableOfMap extensionK, V> > -
deepCopy(
{bool growable = true}) → List< Map< K, Map< >K1, V1> > -
Available on Iterable<
Returns a new List that contains a deep copy of every element from this.Map< , provided by the MyUtilityExtensionDeepCopyIterableOfMapWithValueMap extensionK, Map< >K1, V1> > -
deepCopy(
{bool growable = true}) → List< Map< Map< >K1, V1> , V> -
Available on Iterable<
Returns a new List that contains a deep copy of every element from this.Map< , provided by the MyUtilityExtensionDeepCopyIterableOfMapWithKeyMap extensionMap< >K1, V1> , V> -
distinct(
) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable containing only distinct elements from the collection.E> , provided by the IterableDistinct extension -
distinctBy<
R> (R selector(E element)) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable containing only elements from the collection having distinct keys returned by the givenE> , provided by the IterableDistinctBy extensionselector
function. -
drop(
int n) → List< E> -
Available on List<
Returns a new list containing all elements except firstE> , provided by the ListDropExtension extensionn
elements. -
dropLast(
int n) → List< E> -
Available on List<
Returns a new list containing all elements except lastE> , provided by the ListDropLastExtension extensionn
elements. -
dropLastWhile(
bool predicate(E element)) → List< E> -
Available on List<
Returns a new list containing all elements except last elements that satisfy the givenE> , provided by the ListDropLastWhileExtension extensionpredicate
. -
dropWhile(
bool predicate(E element)) → List< E> -
Available on List<
Returns a new list containing all elements except last elements that satisfy the givenE> , provided by the ListDropWhileExtension extensionpredicate
. -
elementAt(
int index) → E -
Returns the
index
th element.inherited -
elementAtOrDefault(
int index, E defaultValue) → E -
Available on Iterable<
Returns an element at the givenE> , provided by the IterableElementAtOrDefault extensionindex
ordefaultValue
if theindex
is out of bounds of this collection. -
elementAtOrElse(
int index, E defaultValue(int index)) → E -
Available on Iterable<
Returns an element at the givenE> , provided by the IterableElementAtOrElse extensionindex
or the result of calling thedefaultValue
function if theindex
is out of bounds of this collection. -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindex
of this iterable, ornull
. -
elementAtOrNull(
int index) → E? -
Available on List<
Returns an element at the givenE> , provided by the ListElementAtOrNull extensionindex
ornull
if theindex
is out of bounds of this list. -
elementAtOrNull(
int index) → E? -
Available on Iterable<
Returns an element at the givenE> , provided by the IterableElementAtOrNull extensionindex
ornull
if theindex
is out of bounds of this collection. -
every(
bool test(E element)) → bool -
Checks whether every element of this iterable satisfies
test
.inherited -
except(
Iterable< E> elements) → Iterable<E> -
Available on Iterable<
Returns a new lazy Iterable containing all elements of this collection except the elements contained in the givenE> , provided by the IterableExcept extensionelements
collection. -
exceptElement(
E element) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable containing all elements of this collection except the givenE> , provided by the IterableExceptElement extensionelement
. -
expand<
T> (Iterable< T> f(E element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
fillRange(
int start, int end, [E? fillValue]) → void -
Overwrites a range of elements with
fillValue
.inherited -
filter(
bool predicate(E element)) → Iterable< E> -
Available on Iterable<
Returns all elements matching the givenE> , provided by the IterableFilter extensionpredicate
. -
filterIndexed(
bool predicate(E element, int index)) → Iterable< E> -
Available on Iterable<
Returns all elements that satisfy the givenE> , provided by the IterableFilterIndexed extensionpredicate
. -
filterIndexedTo(
List< E> destination, bool predicate(E element, int index)) → void -
Available on Iterable<
Appends all elements matching the givenE> , provided by the IterableFilterIndexedTo extensionpredicate
to the givendestination
. -
filterNot(
bool predicate(E element)) → Iterable< E> -
Available on Iterable<
Returns all elements not matching the givenE> , provided by the IterableFilterNot extensionpredicate
. -
filterNotIndexed(
bool predicate(E element, int index)) → Iterable< E> -
Available on Iterable<
Returns all elements not matching the givenE> , provided by the IterableFilterNotIndexed extensionpredicate
. -
filterNotNull(
) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable with all elements which are not null.E?> , provided by the IterableFilterNotNull extension -
filterNotTo(
List< E> destination, bool predicate(E element)) → void -
Available on Iterable<
Appends all elements not matching the givenE> , provided by the IterableFilterNotTo extensionpredicate
to the givendestination
. -
filterNotToIndexed(
List< E> destination, bool predicate(E element, int index)) → void -
Available on Iterable<
Appends all elements not matching the givenE> , provided by the IterableFilterNotToIndexed extensionpredicate
to the givendestination
. -
filterTo(
List< E> destination, bool predicate(E element)) → void -
Available on Iterable<
Appends all elements matching the givenE> , provided by the IterableFilterTo extensionpredicate
to the givendestination
. -
firstOrDefault(
E defaultValue) → E -
Available on Iterable<
First element orE> , provided by the IterableFirstOrDefault extensiondefaultValue
if the collection is empty. -
firstOrNullWhere(
bool predicate(E element)) → E? -
Available on Iterable<
Returns the first element matching the givenE> , provided by the IterableFirstOrNullWhere extensionpredicate
, ornull
if no such element was found. -
firstWhere(
bool test(E element), {E orElse()?}) → E -
The first element that satisfies the given predicate
test
.inherited -
firstWhile(
bool predicate(E element)) → Iterable< E> -
Available on Iterable<
/ Returns the first elements satisfying the givenE> , provided by the IterableFirstWhile extensionpredicate
. -
flatMap<
R> (Iterable< R> transform(E element)) → Iterable<R> -
Available on Iterable<
Returns a new lazy Iterable of all elements yielded from results ofE> , provided by the IterableFlatMap extensiontransform
function being invoked on each element of this collection. -
flatten(
) → List< E> -
Available on List<
Returns a new List of all elements from all lists in this List.List< , provided by the ListFlattenExtension extensionE> > -
flatten(
) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable of all elements from all collections in this collection.Iterable< , provided by the IterableIterableX extensionE> > -
fold<
T> (T initialValue, T combine(T previousValue, E element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(
Iterable< E> other) → Iterable<E> -
Creates the lazy concatenation of this iterable and
other
.inherited -
forEach(
void f(E element)) → void -
Invokes
action
on each element of this iterable in iteration order.inherited -
forEachIndexed(
void action(E element, int index)) → void -
Available on Iterable<
Performs the givenE> , provided by the IterableForEachIndexed extensionaction
on each element, providing sequential index with the element. -
getRandom(
[Random? random]) → E -
Available on Iterable<
E> , provided by the MyUtilityExtensionIterableGetRandom extension -
getRange(
int start, int end) → Iterable< E> -
Creates an Iterable that iterates over a range of elements.
inherited
-
groupBy<
K> (K keySelector(E element)) → Map< K, List< E> > -
Available on Iterable<
Groups elements of the original collection by the key returned by the givenE> , provided by the IterableGroupBy extensionkeySelector
function applied to each element and returns a map. -
indexOf(
E element, [int start = 0]) → int -
The first index of
element
in this list.inherited -
indexWhere(
bool test(E element), [int start = 0]) → int -
The first index in the list that satisfies the provided
test
.inherited -
insert(
int index, E element) → void -
Inserts
element
at positionindex
in this list.inherited -
insertAll(
int index, Iterable< E> iterable) → void -
Inserts all objects of
iterable
at positionindex
in this list.inherited -
insertionSort(
{Comparator< E> ? comparator, int start = 0, int? end}) → void -
Available on List<
Sort this list betweenE> , provided by the ListInsertionSortExtension extensionstart
(inclusive) andend
(exclusive) using insertion sort. -
intersect(
Iterable< E> other) → Iterable<E> -
Available on Iterable<
Returns a new lazy Iterable containing all elements that are contained by both this collection and theE> , provided by the IterableIntersect extensionother
collection. -
join(
[String separator = '']) → String -
Converts each element to a String and concatenates the strings.
inherited
-
joinToString(
{String separator = ', ', String transform(E element)?, String prefix = '', String postfix = '', int? limit, String truncated = '...'}) → String -
Available on Iterable<
Creates a string from all the elements separated usingE> , provided by the IterableJoinToString extensionseparator
and using the givenprefix
andpostfix
if supplied. -
lastIndexOf(
E element, [int? start]) → int -
The last index of
element
in this list.inherited -
lastIndexWhere(
bool test(E element), [int? start]) → int -
The last index in the list that satisfies the provided
test
.inherited -
lastOrElse(
E defaultValue) → E -
Available on Iterable<
Last element orE> , provided by the IterableLastOrElse extensiondefaultValue
if the collection is empty. -
lastOrNullWhere(
bool predicate(E element)) → E? -
Available on Iterable<
Returns the last element matching the givenE> , provided by the IterableLastOrNullWhere extensionpredicate
, ornull
if no such element was found. -
lastWhere(
bool test(E element), {E orElse()?}) → E -
The last element that satisfies the given predicate
test
.inherited -
lastWhile(
bool predicate(E element)) → Iterable< E> -
Available on Iterable<
Returns the last elements satisfying the givenE> , provided by the IterableLastWhile extensionpredicate
. -
lowerBound(
E value, {int compare(E a, E b)?}) → int -
Available on List<
Returns the first position in this list that does not compare less thanE> , provided by the ListLowerBoundExtension extensionvalue
. -
map<
T> (T f(E e)) → Iterable< T> -
The current elements of this iterable modified by
toElement
.inherited -
mapIndexed<
R> (R transform(int index, E)) → Iterable< R> -
Available on Iterable<
Returns a new lazy Iterable containing the results of applying the givenE> , provided by the IterableMapIndexed extensiontransform
function to each element and its index in the original collection. -
mapIndexedNotNull<
R> (R? transform(int index, E)) → Iterable< R> -
Available on Iterable<
Returns a new lazy Iterable containing only the non-null results of applying the givenE> , provided by the IterableMapIndexedNotNull extensiontransform
function to each element and its index in the original collection. -
mapNotNull<
R> (R? transform(E element)) → Iterable< R> -
Available on Iterable<
Returns a new lazy Iterable containing only the non-null results of applying the givenE> , provided by the IterableMapNotNull extensiontransform
function to each element in the original collection. -
max(
) → E? -
Available on Iterable<
Returns the largest element orE> , provided by the IterableMax extensionnull
if there are no elements. -
maxBy(
Comparable selector(E element)) → E? -
Available on Iterable<
Returns the first element yielding the largest value of the givenE> , provided by the IterableMaxBy extensionselector
ornull
if there are no elements. -
maxWith(
Comparator< E> comparator) → E? -
Available on Iterable<
Returns the first element having the largest value according to the providedE> , provided by the IterableMaxWith extensioncomparator
ornull
if there are no elements. -
median(
) → double -
Available on Iterable<
Returns the median of the elements in this collection.T> , provided by the IterableNumMedianExtension extension -
mergeSort(
{int start = 0, int? end, Comparator< E> ? comparator}) → void -
Available on List<
Sorts this list betweenE> , provided by the ListMergeSortExtension extensionstart
(inclusive) andend
(exclusive) using the merge sort algorithm. -
min(
) → E? -
Available on Iterable<
Returns the smallest element orE> , provided by the InterableMin extensionnull
if there are no elements. -
minBy(
Comparable selector(E element)) → E? -
Available on Iterable<
Returns the first element yielding the smallest value of the givenE> , provided by the IterableMinBy extensionselector
ornull
if there are no elements. -
minWith(
Comparator< E> comparator) → E? -
Available on Iterable<
Returns the first element having the smallest value according to the providedE> , provided by the IterableMinWith extensioncomparator
ornull
if there are no elements. -
none(
bool predicate(E element)) → bool -
Available on Iterable<
Returns true if no entries match the givenE> , provided by the IterableNone extensionpredicate
or if the collection is empty. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEach(
void action(E element)) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable which performs the given action on each element.E> , provided by the IterableOnEach extension -
partition(
bool predicate(E element)) → List< List< E> > -
Available on Iterable<
Splits the collection into two lists according toE> , provided by the IterablePartition extensionpredicate
. -
prepend(
Iterable< E> elements) → Iterable<E> -
Available on Iterable<
Returns a new lazy Iterable containing all elements of this collection and then all elements of the givenE> , provided by the IterablePrepend extensionelements
collection. -
prependElement(
E element) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable containing all elements of this collection and then the givenE> , provided by the IterablePrependElement extensionelement
. -
reduce(
E combine(E value, E element)) → E -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
remove(
Object? value) → bool -
Removes the first occurrence of
value
from this list.inherited -
removeAt(
int index) → E -
Removes the object at position
index
from this list.inherited -
removeLast(
) → E -
Removes and returns the last object in this list.
inherited
-
removeRange(
int start, int end) → void -
Removes a range of elements from the list.
inherited
-
removeWhere(
bool test(E element)) → void -
Removes all objects from this list that satisfy
test
.inherited -
replaceRange(
int start, int end, Iterable< E> iterable) → void -
Replaces a range of elements with the elements of
replacements
.inherited -
retainWhere(
bool test(E element)) → void -
Removes all objects from this list that fail to satisfy
test
.inherited -
setAll(
int index, Iterable< E> iterable) → void -
Overwrites elements with the objects of
iterable
.inherited -
setRange(
int start, int end, Iterable< E> iterable, [int skipCount = 0]) → void -
Writes some elements of
iterable
into a range of this list.inherited -
shuffle(
[Random? random]) → void -
Shuffles the elements of this list randomly.
inherited
-
shuffled(
[Random? random]) → List< E> -
Available on Iterable<
Returns a new, randomly shuffled list.E> , provided by the IterableShuffled extension -
singleWhere(
bool test(E element), {E orElse()?}) → E -
The single element that satisfies
test
.inherited -
skip(
int n) → Iterable< E> -
Creates an Iterable that provides all but the first
count
elements.inherited -
skipWhile(
bool test(E value)) → Iterable< E> -
Creates an
Iterable
that skips leading elements whiletest
is satisfied.inherited -
slice(
int start, [int end = -1]) → List< E> -
Available on Iterable<
Returns a new list containing elements at indices betweenE> , provided by the IterableSlice extensionstart
(inclusive) andend
(inclusive). -
sort(
[int compare(E a, E b)?]) → void -
Sorts this list according to the order specified by the
compare
function.inherited -
sorted(
) → List< E> -
Available on Iterable<
Returns a new list with all elements sorted according to natural sort order.E> , provided by the IterableSorted extension -
sortedBy(
Comparable selector(E element)) → SortedList< E> -
Available on Iterable<
Returns a new list with all elements sorted according to natural sort order of the values returned by specifiedE> , provided by the IterableSortedBy extensionselector
function. -
sortedByDescending(
Comparable selector(E element)) → SortedList< E> -
Available on Iterable<
Returns a new list with all elements sorted according to descending natural sort order of the values returned by specifiedE> , provided by the IterableSortedByDescending extensionselector
function. -
sortedDescending(
) → List< E> -
Available on Iterable<
Returns a new list with all elements sorted according to descending natural sort order.E> , provided by the IterableSortedDescending extension -
sortedWith(
Comparator< E> comparator) → SortedList<E> -
Available on Iterable<
Returns a new list with all elements sorted according to specifiedE> , provided by the IterableSortedWith extensioncomparator
. -
splitWhen(
bool predicate(E, E)) → Iterable< List< E> > -
Available on Iterable<
Splits this collection into a lazy Iterable, where each split will be make ifE> , provided by the IterableSplitWhen extensionpredicate
returns true for a pair of entries. -
startsWith(
Iterable< E> otherIterable) → bool -
Available on Iterable<
Returns if this Iterable starts with the elements ofE> , provided by the IterableStartsWithExtension extensionotherIterable
. -
sublist(
int start, [int? end]) → List< E> -
Returns a new list containing the elements between
start
andend
.inherited -
sum(
) → T -
Available on Iterable<
Returns the sum of all elements in the collection.T> , provided by the IterableNumSumExtension extension -
sumBy<
T extends num> (T selector(E element)) → T -
Available on Iterable<
Returns the sum of all values produced byE> , provided by the IterableSumBy extensionselector
function applied to each element in the collection. -
swap(
int indexA, int indexB) → void -
Available on List<
Swaps the elements in the indices provided.E> , provided by the ListSwapExtension extension -
take(
int n) → Iterable< E> -
Creates a lazy iterable of the
count
first elements of this iterable.inherited -
takeFirst(
int n) → List< E> -
Available on Iterable<
Returns a list containing firstE> , provided by the IterableTakeFirst extensionn
elements. -
takeLast(
int n) → List< E> -
Available on Iterable<
Returns a list containing lastE> , provided by the IterableTakeLast extensionn
elements. -
takeWhile(
bool test(E value)) → Iterable< E> -
Creates a lazy iterable of the leading elements satisfying
test
.inherited -
thenBy(
Comparable selector(E element)) → SortedList< E> -
Returns a new list with all elements sorted according to previously
defined order and natural sort order of the values returned by specified
selector
function. -
thenByDescending(
Comparable selector(E element)) → SortedList< E> -
Returns a new list with all elements sorted according to previously
defined order and descending natural sort order of the values returned by
specified
selector
function. -
thenWith(
Comparator< E> comparator) → SortedList<E> -
Returns a new list with all elements sorted according to previously
defined order and specified
comparator
. -
toHashSet(
) → HashSet< E> -
Available on Iterable<
Returns a new HashSet with all distinct elements of this collection.E> , provided by the IterableToHashSet extension -
toIndexKeyMap(
) → Map< int, E> -
Available on Iterable<
E> , provided by the MyUtilityExtensionIterableToIndexKeyMap extension -
toIterable(
) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable with all elements of this collection.E> , provided by the IterableToIterable extension -
toList(
{bool growable = true}) → List< E> -
Creates a List containing the elements of this Iterable.
inherited
-
toMap<
K, V> ({required K key(int index, E element), required V value(int index, E element)}) → Map< K, V> -
Available on Iterable<
E> , provided by the MyUtilityExtensionIterableToMap extension -
toOctalMode(
) → String -
Available on Iterable<
FileStatPermission> , provided by the MyUtilityExtensionFileStatPermissionToOctalMode extension -
toSet(
) → Set< E> -
Creates a Set containing the same elements as this iterable.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toUnmodifiable(
) → List< E> -
Available on Iterable<
Returns an unmodifiable List view of this collection.E> , provided by the IterableToUnmodifiable extension -
union(
Iterable< E> other) → Iterable<E> -
Available on Iterable<
Returns a new lazy Iterable containing all distinct elements from both collections.E> , provided by the IterableUnion extension -
where(
bool test(E element)) → Iterable< E> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test
.inherited -
whereIndexed(
bool predicate(E element, int index)) → Iterable< E> -
Available on Iterable<
Returns all elements that satisfy the givenE> , provided by the IterableWhereIndexed extensionpredicate
. -
whereIndexedTo(
List< E> destination, bool predicate(E element, int index)) → void -
Available on Iterable<
Appends all elements matching the givenE> , provided by the IterableWhereIndexedTo extensionpredicate
to the givendestination
. -
whereNot(
bool predicate(E element)) → Iterable< E> -
Available on Iterable<
Returns all elements not matching the givenE> , provided by the IterableWhereNot extensionpredicate
. -
whereNotIndexed(
bool predicate(E element, int index)) → Iterable< E> -
Available on Iterable<
Returns all elements not matching the givenE> , provided by the IterableWhereNotIndexed extensionpredicate
. -
whereNotNull(
) → Iterable< E> -
Available on Iterable<
Returns a new lazy Iterable with all elements which are not null.E?> , provided by the IterableWhereNotNull extension -
whereNotTo(
List< E> destination, bool predicate(E element)) → void -
Available on Iterable<
Appends all elements not matching the givenE> , provided by the IterableWhereNotTo extensionpredicate
to the givendestination
. -
whereNotToIndexed(
List< E> destination, bool predicate(E element, int index)) → void -
Available on Iterable<
Appends all elements not matching the givenE> , provided by the IterableWhereNotToIndexed extensionpredicate
to the givendestination
. -
whereTo(
List< E> destination, bool predicate(E element)) → void -
Available on Iterable<
Appends all elements matching the givenE> , provided by the IterableWhereTo extensionpredicate
to the givendestination
. -
whereType<
T> () → Iterable< T> -
Creates a new lazy Iterable with all elements that have type
T
.inherited -
windowed(
int size, {int step = 1, bool partialWindows = false}) → Iterable< List< E> > -
Available on Iterable<
Returns a new lazy Iterable of windows of the givenE> , provided by the IterableWindowed extensionsize
sliding along this collection with the givenstep
. -
zip<
R, V> (Iterable< R> other, V transform(E a, R b)) → Iterable<V> -
Available on Iterable<
Returns a new lazy Iterable of values built from the elements of this collection and theE> , provided by the IterableZip extensionother
collection with the same index.
Operators
-
operator +(
List< E> other) → List<E> -
Returns the concatenation of this list and
other
.inherited -
operator +(
Iterable< E> elements) → List<E> -
Available on Iterable<
Returns a new list containing all elements of the givenE> , provided by the IterablePlus extensionelements
collection and then all elements of this collection. -
operator -(
Iterable< E> elements) → List<E> -
Available on Iterable<
Returns a new list containing all elements of this collection except the elements contained in the givenE> , provided by the IterableMinus extensionelements
collection. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → E -
The object at the given
index
in the list.inherited -
operator [](
int index) → E -
Available on Iterable<
Syntactic sugar for calling elementAt withE> , provided by the MyUtilityExtensionIterableOperatorSquareBrackets extensionindex
. -
operator []=(
int index, E value) → void -
Sets the value at the given
index
in the list tovalue
.inherited -
operator |(
FileStatPermission permission) → Set< FileStatPermission> -
Available on Iterable<
Returns a new Set of FileStatPermissions, with every FileStatPermission from this andFileStatPermission> , provided by the MyUtilityExtensionFileStatPermissionOperatorPipe extensionpermission
.