L<T> class abstract

Implemented types
Available Extensions
Annotations
  • @visibleForOverriding

Constructors

L()

Properties

first → T
The first element.
no setteroverride
getFlushed List<T>
Returns the flushed list (flushes it only once). It is an error to use the flushed list outside of the L class.
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether this collection has no elements.
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setteroverride
iter Iterable<T>
no setter
iterator Iterator<T>
Returns a new Iterator that allows iterating the items of the IList.
no setteroverride
last → T
The last element.
no setteroverride
length int
The number of elements in this.
no setteroverride
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.
no setteroverride
unlock List<T>
Returns a regular Dart (mutable, growable) List.
no setter

Methods

add(T item) L<T>
addAll(Iterable<T> items) L<T>
any(Predicate<T> test) bool
Checks whether any element of this iterable satisfies test.
override
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
override
contains(covariant T? element) bool
Whether the collection contains an element equal to element.
override
elementAt(int index) → T
Returns the indexth element.
override
every(Predicate<T> test) bool
Checks whether every element of this iterable satisfies test.
override
expand<E>(Iterable<E> f(T)) Iterable<E>
Expands each element of this Iterable into zero or more elements.
override
firstWhere(Predicate<T> test, {T orElse()?}) → T
The first element that satisfies the given predicate test.
override
fold<E>(E initialValue, E combine(E previousValue, T element)) → E
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
override
followedBy(Iterable<T> other) Iterable<T>
Creates the lazy concatenation of this iterable and other.
override
forEach(void f(T element)) → void
Invokes action on each element of this iterable in iteration order.
override
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
override
lastWhere(Predicate<T> test, {T orElse()?}) → T
The last element that satisfies the given predicate test.
override
map<E>(E f(T element)) Iterable<E>
The current elements of this iterable modified by toElement.
override
maxLength(int maxLength) L<T>
If the list has more than maxLength elements, removes the last elements so it remains with only maxLength elements. If the list has maxLength or less elements, doesn't change anything.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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.
override
remove(T element) L<T>
Removes the first occurrence of element from this list.
removeAll(Iterable<T?> elements) L<T>
removeMany(T element) L<T>
singleWhere(Predicate<T> test, {T orElse()?}) → T
The single element that satisfies test.
override
skip(int count) Iterable<T>
Creates an Iterable that provides all but the first count elements.
override
skipWhile(bool test(T value)) Iterable<T>
Creates an Iterable that skips leading elements while test is satisfied.
override
sort([int compare(T a, T b)?]) L<T>
Sorts this list according to the order specified by the compare function. If compare is not provided, it will use the natural ordering of the type T.
sortLike(Iterable<T> ordering) L<T>
Sorts this list according to the order specified by the ordering iterable. Items which don't appear in ordering will be included in the end, in no particular order.
sortOrdered([int compare(T a, T b)?]) L<T>
take(int count) Iterable<T>
Creates a lazy iterable of the count first elements of this iterable.
override
takeWhile(bool test(T value)) Iterable<T>
Creates a lazy iterable of the leading elements satisfying test.
override
toHashSet() HashSet<T>
Unordered set. Returns a HashSet, which is faster than LinkedHashSet and consumes less memory.
toLinkedHashSet() LinkedHashSet<T>
Ordered set. Same as toSet.
toList({bool growable = true}) List<T>
Creates a List containing the elements of this Iterable.
override
toListSet() ListSet<T>
Ordered set which is also a list. Returns a ListSet, which has the same performance and needs less memory than a LinkedHashSet, but can't change size.
toSet() Set<T>
Ordered set.
override
toString() String
A string representation of this object.
inherited
where(Predicate<T> test) Iterable<T>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<E>() Iterable<E>
Creates a new lazy Iterable with all elements that have type T.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → T