IListConst<T> class
This is an IList which can be made constant. Note: Don't ever use it without the "const" keyword, because it will be unsafe.
- Inheritance
-
- Object
- ImmutableCollection<
IList< T> > - IList<
T> - IListConst
- Available extensions
- Annotations
-
- @immutable
Constructors
-
IListConst(List<
T> _list, [ConfigList config = const ConfigList()]) -
To create an empty constant IList:
const IListConst([]). To create a constant list with items:const IListConst([1, 2, 3]).const
Properties
-
asComparableEntries
→ Iterable<
Entry< K, V> > -
Available on Iterable<
MapEntry is not Comparable. If you need to compare two iterables of MapEntry you can do this:MapEntry< , provided by the FicIterableOfMapEntryExtension extensionK, V> >no setter - config → ConfigList
-
final
- first → T
-
Returns the first element.
Throws a StateError if the list is empty.
no setterinherited
-
firstOption
→ Option<
T> -
Available on Iterable<
Returns the first element as an Option. If the list is empty, it will return None.T> , provided by the IterableExtension extensionno setter - firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - firstOrNull → T?
-
Returns the first element, or
nullif the list is empty.no setterinherited -
flush
→ IListConst<
T> -
Nothing happens when you flush a constant list, by definition.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- head → T
-
Returns the first element of this Iterable
no setterinherited
-
head
→ Option<
T> -
Available on Iterable<
Returns the first element as an Option. If the list is empty, it will return None.T> , provided by the IterableExtension extensionno setter -
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 -
init
→ Option<
Iterable< T> > -
Available on Iterable<
Returns all the of elements except the last.T> , provided by the IterableExtension extensionno setter -
init
→ Iterable<
T> -
Returns an Iterable that is the original iterable without the last element
no setterinherited
- isDeepEquals → bool
-
See also: ConfigList
no setterinherited
- isEmpty → bool
-
Returns
trueif there are no elements in this collection.no setterinherited - isFlushed → bool
-
A constant list is always flushed, by definition.
no setteroverride
- isIdentityEquals → bool
-
See also: ConfigList
no setterinherited
- isNotEmpty → bool
-
Returns
trueif there is at least one element in this collection.no setterinherited -
iterator
→ Iterator<
T> -
Returns a new
Iteratorthat allows iterating the elements of this IList.no setterinherited - last → T
-
Returns the last element.
Throws a StateError if the list is empty.
no setterinherited
-
lastOption
→ Option<
T> -
Available on Iterable<
Returns the last element as an Option. If the list is empty, it will return None.T> , provided by the IterableExtension extensionno setter - lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - lastOrNull → T?
-
Returns the last element, or
nullif the list is empty.no setterinherited - length → int
-
The number of objects in this list.
no setterinherited
-
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnullelements of this iterable.no setter -
reversed
→ IList<
T> -
Returns an Iterable of the objects in this list in reverse order.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → T
-
Checks that this iterable has only one element, and returns that element.
Throws a StateError if the list is empty or has more than one element.
no setterinherited
- singleOrNull → T?
-
Checks that the list has only one element, and returns that element.
Return
nullif the list is empty or has more than one element.no setterinherited - singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull.no setter -
tail
→ Option<
Iterable< T> > -
Available on Iterable<
Returns all the of elements except the first.T> , provided by the IterableExtension extensionno setter -
tail
→ Iterable<
T> -
Returns an Iterable that is the original iterable without head, aka first element
no setterinherited
-
toJSIterable
→ JSIterable<
T> -
Available on Iterable<
A JSIterable wrapper that proxies to the Dart iterable API.T> , provided by the IterableToJSIterable extensionno setter -
unlock
→ List<
T> -
Unlocks the list, returning a regular (mutable, growable) List. This
list is "safe", in the sense that is independent from the original IList.
no setterinherited
-
unlockLazy
→ List<
T> -
Unlocks the list, returning a safe, modifiable (mutable) List.
Using this is very fast at first, since it makes no copies of the IList
items. However, if and only if you use a method that mutates the list,
like add, it will unlock internally (make a copy of all IList items). This is
transparent to you, and will happen at most only once. In other words,
it will unlock the IList, lazily, only if necessary.
If you never mutate the list, it will be very fast to lock this list
back into an IList.
no setterinherited
-
unlockView
→ List<
T> -
Unlocks the list, returning a safe, unmodifiable (immutable) List view.
The word "view" means the list is backed by the original IList.
Using this is very fast, since it makes no copies of the IList items.
However, if you try to use methods that modify the list, like add,
it will throw an UnsupportedError.
It is also very fast to lock this list back into an IList.
no setterinherited
-
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter -
withDeepEquals
→ IList<
T> -
Creates a list with
deepEquals(compares all list items by equality).no setterinherited -
withIdentityEquals
→ IList<
T> -
Creates a list with
identityEquals(compares the internals byidentity).no setterinherited
Methods
-
add(
T item) → IList< T> -
Return a new list with
itemadded to the end of the current list, (thus extending the length by one).inherited -
addAll(
Iterable< T> items) → IList<T> -
Returns a new list with all
itemsadded to the end of the current list, (thus extending the length by the length of items).inherited -
any(
Predicate< T> test) → bool -
Checks whether any element of this iterable satisfies
test.inherited -
anyIs(
T value) → bool -
Available on Iterable<
ReturnsT> , provided by the FicIterableExtension extensiontrueif any item is equal tovalue. -
append(
T t) → Iterable< T> -
Available on Iterable<
Returns a new iterable with the given element appended to the end.T> , provided by the IterableExtension extension -
asList(
) → List< T> -
Available on Iterable<
Returns a List containing the elements of this iterable. If the Iterable is already a List, return the same instance (nothing new is created). Otherwise, create a new List from it. See also: Dart's native toList, which always creates a new list.T> , provided by the FicIterableExtension extension -
asMap(
) → IMap< int, T> -
Returns an IMap view of this list.
The map uses the indices of this list as keys and the corresponding objects
as values. The
Map.keysIterable iterates the indices of this list in numerical order.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 -
asSet(
) → Set< T> -
Available on Iterable<
Creates a Set containing the same elements as this iterable. If the Iterable is already a Set, return the same instance (nothing new is created). Otherwise, create a new Set from it. See also: Dart's native toSet, which always creates a new set.T> , provided by the FicIterableExtension extension -
averageBy<
N extends num> (N mapper(T element)) → double -
Available on Iterable<
The arithmetic mean of the elements of a non-empty iterable. The arithmetic mean is the sum of the elements divided by the number of elements. If iterable is empty it returns 0. Examples:T> , provided by the FicIterableExtension extension -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname. -
cached<
R> (CacheKey< IList< key) → RT> , R> -
Returns a cached value derived from this list, computing it on first access.
inherited
-
cast<
R> () → Iterable< R> -
Returns a list of
Rinstances. If this list contains instances which cannot be cast toR, it will throw an error.inherited -
clear(
) → IList< T> -
Returns an empty list with the same configuration.
inherited
-
contains(
covariant T? element) → bool -
Returns
trueif the collection contains an element equal toelement,falseotherwise.inherited -
corresponds<
U> (Iterable< U> others, EQ eq) → bool -
Return true if length match and all Eq are true.
inherited
-
count(
Predicate< T> p) → int -
Positives predicate results count
inherited
-
deepEquals(
Iterable? other, {bool ignoreOrder = false}) → bool -
Available on Iterable<
Compare all items, in order or not, according toT> , provided by the FicIterableExtension extensionignoreOrder, using operator ==. Return true if they are all the same, in the same order. -
deepEqualsByIdentity(
Iterable? other, {bool ignoreOrder = false}) → bool -
Available on Iterable<
Return true if they are all the same, in the same order. Compare all items, in order or not, according toT> , provided by the FicIterableExtension extensionignoreOrder, using identical. Return true if they are all the same, in the same order. -
divideIn2(
bool test(T item)) → IListOf2< IList< T> > -
Divides the list into two.
The first one contains all items which satisfy the provided
test. The last one contains all the other items. The relative order of the items will be maintained.inherited -
elementAt(
int index) → T -
Returns the
indexth element. This is the same as using the [] operator. See also: get and getOrNull.inherited -
elementAtOption(
int index) → Option< T> -
Available on Iterable<
Get the element at the givenT> , provided by the IterableExtension extensionindexas an Option. If the element does not exist, it will return None. -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindexof this iterable, ornull. -
equalItems(
covariant Iterable? other) → bool -
Will return
trueonly if the IList items are equal to the iterable items, and in the same order. This may be slow for very large lists, since it compares each item, one by one. You can compare the list with ordered sets, but unordered sets will throw aStateError. To compare the IList with unordered sets, try the unorderedEqualItems method.inherited -
equalItemsAndConfig(
IList? other) → bool -
Will return
trueonly if the list items are equal and in the same order, and the list configurations are equal. This may be slow for very large lists, since it compares each item, one by one.inherited -
every(
Predicate< T> test) → bool -
Checks whether every element of this iterable satisfies
test.inherited -
everyIs(
T value) → bool -
Available on Iterable<
ReturnsT> , provided by the FicIterableExtension extensiontrueif all items are equal tovalue. -
expand<
E> (Iterable< E> f(T)) → Iterable<E> -
Expands each element of this Iterable into zero or more elements.
inherited
-
fillRange(
int start, int end, [T? fillValue]) → IList< T> -
Sets the objects in the range
startinclusive toendexclusive to the givenfillValue.inherited -
findDuplicates(
) → Set< T> -
Available on Iterable<
Finds duplicates and then returns a Set with the duplicated elements. If there are no duplicates, an empty Set is returned.T> , provided by the FicIterableExtension extension -
firstOr(
T orElse) → T -
Returns the first element, or
orElseif the list is empty.inherited -
firstWhere(
Predicate< T> test, {T orElse()?}) → T -
Iterates through elements and returns the first to satisfy
test.inherited -
firstWhereOption(
bool predicate(T element)) → Option< T> -
Available on Iterable<
The first element satisfyingT> , provided by the IterableExtension extensionpredicateas an Option. -
fold<
E> (E initialValue, E combine(E previousValue, T element)) → E -
Reduces a collection to a single value by iteratively combining eac element of the collection
with an existing value.
inherited
-
followedBy(
Iterable< T> other) → Iterable<T> -
Returns the lazy concatenation of this iterable and
other.inherited -
forEach(
void f(T element)) → void -
Applies the function
fto each element of this collection in iteration order.inherited -
get(
int index, {T orElse(int index)?}) → T -
Returns the
indexth element. If that index doesn't exist (negative, or out of range), will return the result of callingorElse. In this case, iforElseis not provided, will throw an error.inherited -
getAndMap(
int index, T map(int index, bool inRange, T? value)) → T -
Gets the
indexth element, and then apply themapfunction to it, returning the result. If that index doesn't exist (negative, or out of range), will themapmethod will be called withinRangefalse andvaluenull.inherited -
getOrNull(
int index) → T? -
Returns the
indexth element. If that index doesn't exist (negative or out of range), will return null. This method will never throw an error.inherited -
getRange(
int start, int end) → Iterable< T> -
Returns an Iterable that iterates over the objects in the range
startinclusive toendexclusive.inherited -
indexOf(
T element, [int start = 0]) → int -
Returns the index of the first
elementin the list.inherited -
indexWhere(
Predicate< T> test, [int start = 0]) → int -
Returns the first index in the list that satisfies the provided
test.inherited -
inits(
) → Iterable< Iterable< T> > -
inherited
-
inRange(
int index) → bool -
Returns
trueif the givenindexis valid (between0andlength - 1).inherited -
insert(
int index, T element) → IList< T> -
Inserts the object at position
indexin this list and returns a new immutable list.inherited -
insertAll(
int index, Iterable< T> iterable) → IList<T> -
Inserts all objects of
iterableat positionindexin this list.inherited -
intersectsWith(
Iterable< T> other) → bool -
Available on Iterable<
Returns true if this Iterable has any items in common with theT> , provided by the FicIterableExtension extensionotherIterable. This method is as performant as possible, but it will be faster if any of the Iterables is a Set or an ISet. -
isFirst(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis the same (by identity) as the first iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you have the first item. For example: -
isLast(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis the same (by identity) as the last iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you have the last item. For example: -
isNotFirst(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis NOT the same (by identity) as the first iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you don't have the first item. For example: -
isNotLast(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis NOT the same (by identity) as the last iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you don't have the last item. For example: -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings with the
separatorin-between each concatenation.inherited -
lastIndexOf(
T element, [int? start]) → int -
Returns the last index of
elementin this list.inherited -
lastIndexWhere(
Predicate< T> test, [int? start]) → int -
Returns the last index in the list that satisfies the provided
test.inherited -
lastOr(
T orElse) → T -
Returns the last element, or
orElseif the list is empty.inherited -
lastWhere(
Predicate< T> test, {T orElse()?}) → T -
Returns the last element that satisfies the given predicate
test.inherited -
lengthCompare(
Iterable others) → bool -
Compare with
otherslengthinherited -
map<
E> (E f(T element), {ConfigList? config}) → Iterable< E> -
Returns a new lazy Iterable with elements that are created by calling
fon each element of this Iterable in iteration order.inherited -
mapIndexedAndLast<
R> (R convert(int index, T item, bool isLast)) → Iterable< R> -
Available on Iterable<
Maps each element and its index to a new value. This is similar toT> , provided by the FicIterableExtension extensionmapIndexedbut also tells you which item is the last. -
mapNotNull<
E> (E? f(T? e)) → Iterable< E> -
Available on Iterable<
Similar to map, but MAY return a non-nullable type.T?> , provided by the FicIterableExtensionTypeNullable extension -
maxLength(
int maxLength, {int priority(T a, T b)?}) → IList< T> -
If the list has more than
maxLengthelements, remove the last elements so it remains with onlymaxLengthelements. If the list hasmaxLengthor less elements, doesn't change anything.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepend(
T t) → Iterable< T> -
Available on Iterable<
Returns a new iterable with the given element prepended to the start.T> , provided by the IterableExtension extension -
process(
{bool test(IList< T> list, int index, T item)?, required Iterable<T> ? convert(IList<T> list, int index, T item)}) → IList<T> -
Allows for complex processing of a list.
inherited
-
put(
int index, T value) → IList< T> -
This is the equivalent to
void operator []=(int index, T value);for the List. Sets the value at the givenindexin the list tovalueor throws a RangeError ifindexis out of bounds.inherited -
putXY(
{required int x, required int y, required T value}) → IList< IList< T> > -
Available on IList<
For a list of lists like this:IList< , provided by the IList2dExtension extensionT> > -
reduce(
T combine(T value, T element)) → T -
Reduces a collection to a single value by iteratively combining elements of the collection
using the provided function.
inherited
-
remove(
T item) → IList< T> -
Removes the first occurrence of
itemfrom this IList.inherited -
removeAll(
Iterable< T?> items) → IList<T> -
Removes all occurrences of all
itemsfrom this list. Same as calling removeMany for each item initems.inherited -
removeAt(
int index, [Output< T> ? removedItem]) → IList<T> -
Removes the object at position
indexfrom this list.inherited -
removeDuplicates(
) → IList< T> -
Removes duplicates (but keeps items which appear only
once, plus the first time other items appear).
inherited
-
removeLast(
[Output< T> ? removedItem]) → IList<T> -
Removes the last object from this list.
This method reduces the length of
thisby one.inherited -
removeMany(
T item) → IList< T> -
Removes all occurrences of
itemfrom this list.inherited -
removeNulls(
) → IList< T> -
Removes all nulls from this list.
inherited
-
removeNullsAndDuplicates(
) → IList< T> -
Removes duplicates (but keeps items which appear only
once, plus the first time other items appear).
inherited
-
removeRange(
int start, int end) → IList< T> -
Removes the objects in the range
startinclusive toendexclusive.inherited -
removeWhere(
Predicate< T> test) → IList<T> -
Removes all objects from this list that satisfy
test.inherited -
replace(
int index, T value) → IList< T> -
This is the equivalent to
void operator []=(int index, T value);for the List. Sets the value at the givenindexin the list tovalueor throws a RangeError ifindexis out of bounds.inherited -
replaceAll(
{required T from, required T to}) → IList< T> -
Finds all occurrences of
from, and replace them withto.inherited -
replaceAllWhere(
Predicate< T> test, T to) → IList<T> -
Finds all items that satisfy the provided
test, and replace it withto.inherited -
replaceBy(
int index, T transform(T orElse)) → IList< T> -
Returns a new IList, replacing the object at position
indexwith the result of calling the functiontransform. This function gets the previous object at positionindexas a parameter.inherited -
replaceFirst(
{required T from, required T to}) → IList< T> -
Finds the first occurrence of
from, and replace it withto.inherited -
replaceFirstWhere(
bool test(T item), T replacement(T? item), {bool addIfNotFound = false}) → IList< T> -
Finds the first item that satisfies the provided
test, and replace it with the result ofreplacement.inherited -
replaceRange(
int start, int end, Iterable< T> replacement) → IList<T> -
Removes the objects in the range
startinclusive toendexclusive and inserts the contents ofreplacementin its place.inherited -
restrict(
T? item, {required T orElse}) → T -
Available on Iterable<
Restricts some item to one of those present in this iterable.T> , provided by the FicIterableExtension extension -
retainWhere(
Predicate< T> test) → IList<T> -
Removes all objects from this list that fail to satisfy
test.inherited -
same(
IList< T> ? other) → bool -
Will return
trueif the lists internals are the same instances (comparing by identity). This will be fast even for very large lists, since it doesn't compare each item.override -
scan<
E> (E initialValue, E combine(E previousValue, T element)) → IList< E> -
Returns an IList containing successive accumulation values generated by applying
combinefrom left to right to each element and the current accumulator value, starting withinitialValue.inherited -
setAll(
int index, Iterable< T> iterable) → IList<T> -
Overwrites objects of
thiswith the objects ofiterable, starting at positionindexin this list.inherited -
setRange(
int start, int end, Iterable< T> iterable, [int skipCount = 0]) → IList<T> -
Copies the objects of
iterable, skippingskipCountobjects first, into the rangestart, inclusive, toend, exclusive, of the list.inherited -
shuffle(
[Random? random]) → IList< T> -
Shuffles the elements of this list randomly.
inherited
-
singleOr(
T orElse) → T -
Checks if the list has only one element, and returns that element.
Return
nullif the list is empty or has more than one element.inherited -
singleWhere(
Predicate< T> test, {T orElse()?}) → T -
Returns the single element that satisfies
test.inherited -
skip(
int count) → Iterable< T> -
Returns an Iterable that provides all but the first
countelements.inherited -
skipWhile(
bool test(T item)) → Iterable< T> -
Returns an Iterable that skips leading elements while
testis satisfied.inherited -
sort(
[int compare(T a, T b)?]) → IList< T> -
Sorts this list according to the order specified by the
comparefunction.inherited -
sortedLike(
Iterable ordering) → List< T> -
Available on Iterable<
Returns a list, sorted according to the order specified by theT> , provided by the FicIterableExtension extensionorderingiterable. Items which don't appear inorderingwill be included in the end, in their original order. Items oforderingwhich are not found in the original list are ignored. -
sortedReversed(
[Comparator< T> ? compare]) → List<T> -
Available on Iterable<
Creates a reversed sorted list of the elements of the iterable.T> , provided by the FicIterableExtension extension -
sortLike(
Iterable< T> ordering) → IList<T> -
Sorts this list according to the order specified by the
orderingiterable. Items which don't appear inorderingwill be included in the end, in no particular order.inherited -
sortOrdered(
[int compare(T a, T b)?]) → IList< T> -
Sorts this list according to the order specified by the
comparefunction.inherited -
sortReversed(
[int compare(T a, T b)?]) → IList< T> -
Sorts this list in reverse order in relation to the default sort method.
inherited
-
span(
Predicate< T> p) → (Iterable<T> , Iterable<T> ) -
Split list based on predicate p. (takeWhile p, dropWhile p)
inherited
-
splitAt(
int index) → (Iterable< T> , Iterable<T> ) -
Split the List at specified index
inherited
-
sublist(
int start, [int? end]) → IList< T> -
Returns a new list containing the elements between
startandend.inherited -
sumBy<
N extends num> (N mapper(T element)) → N -
Available on Iterable<
The sum of the values returned by theT> , provided by the FicIterableExtension extensionmapperfunction. -
tails(
) → Iterable< Iterable< T> > -
inherited
-
take(
int count) → Iterable< T> -
Returns an Iterable of the
countfirst elements of this iterable.inherited -
takeWhile(
bool test(T item)) → Iterable< T> -
Returns an Iterable of the leading elements satisfying
test.inherited -
toggle(
T element) → IList< T> -
Removes the first instance of the element, if it exists in the list.
Otherwise, adds it to the list.
inherited
-
toIList(
[ConfigList? config]) → IList< T> -
Available on Iterable<
Creates an immutable list (IList) from the iterable.T> , provided by the FicIterableExtension extension -
toISet(
[ConfigSet? config]) → ISet< T> -
Available on Iterable<
Creates an immutable set (ISet) from the iterable.T> , provided by the FicIterableExtension extension -
toJson(
Object? toJsonT(T)) → Object -
Converts to JSon. Json serialization support for json_serializable with @JsonSerializable.
inherited
-
toList(
{bool growable = true}) → List< T> -
Creates a List containing the elements of this IList.
inherited
-
toSet(
) → Set< T> -
Creates a Set containing the same elements as this IList.
inherited
-
toString(
[bool? prettyPrint]) → String -
Returns a string representation of (some of) the elements of
this.inherited -
unorderedEqualItems(
covariant Iterable? other) → bool -
Will return
trueonly if the IList and the iterable items have the same number of elements, and the elements of the IList can be paired with the elements of the iterable, so that each pair is equal. This may be slow for very large lists, since it compares each item, one by one.inherited -
unzip(
) → (Iterable< U> , Iterable<V> ) -
Available on Iterable<
Iterable Record as Iterable(U, V)> , provided by the FICZipExtension extension -
updateById(
Iterable< T> newItems, dynamic id(T item)) → List<T> -
Available on Iterable<
Returns a new list whereT> , provided by the FicIterableExtension extensionnewItemsare added or updated, by theirid(and theidis a function of the item), like so: -
updateById(
Iterable< T> newItems, dynamic id(T item)) → IList<T> -
Returns a new list where
newItemsare added or updated, by theirid(and theidis a function of the item), like so:inherited -
where(
Predicate< T> test) → Iterable<T> -
Returns an Iterable with all elements that satisfy the predicate
test.inherited -
whereMoveToTheEnd(
bool test(T item)) → IList< T> -
Moves all items that satisfy the provided
testto the end of the list. Keeps the relative order of the moved items.inherited -
whereMoveToTheStart(
bool test(T item)) → IList< T> -
Moves all items that satisfy the provided
testto the start of the list. Keeps the relative order of the moved items.inherited -
whereNoDuplicates(
{dynamic by(T item)?, bool removeNulls = false}) → Iterable< T> -
Available on Iterable<
Removes all duplicates, leaving only the distinct items. Optionally, you can provide anT> , provided by the FicIterableExtension extensionbyfunction to compare the items. -
whereNot(
Predicate< T> test) → Iterable<T> -
Returns an Iterable with all elements that doest NOT satisfy the predicate
test.inherited -
whereType<
E> () → Iterable< R> -
Returns an Iterable with all elements that have type
E.inherited -
withConfig(
ConfigList config) → IList< T> -
Creates a new list with the given
config.inherited -
withConfigFrom(
IList< T> other) → IList<T> -
Returns a new list with the contents of the present IList,
but the config of
other.inherited -
zip<
U> (Iterable< U> otherIterable) → Iterable<(T, U)> -
Aggregate two sources trimming by the shortest source
inherited
-
zipAll<
U> (Iterable< U> otherIterable, {T currentFill(int index)?, U otherFill(int index)?}) → Iterable<(T?, U?)> -
Aggregate two sources based on the longest source.
Missing elements can be completed by passing a
currentFillandotherFillmethods or will be at null by defaultinherited -
zipWithIndex(
) → Iterable< (int, T)> -
Aggregate each element with corresponding index
inherited
Operators
-
operator +(
Iterable< T> other) → IList<T> -
Returns the concatenation of this list and
other. Returns a new list containing the elements of this list followed by the elements ofother.inherited -
operator ==(
Object other) → bool -
If isDeepEquals configuration is
true: Will returntrueonly if the list items are equal (and in the same order), and the list configurations are equal. This may be slow for very large lists, since it compares each item, one by one.If isDeepEquals configuration is
false: Will returntrueonly if the lists internals are the same instances (comparing by identity). This will be fast even for very large lists, since it doesn't compare each item.inherited -
operator [](
int index) → T -
Returns the object at the given
indexin the list or throws a RangeError ifindexis out of bounds.inherited