IterableExtensions<T> extension
Provides extended methods for T arrays.
Tの配列用の拡張メソッドを提供します。
- on
-
- Iterable<
T>
- Iterable<
Properties
- firstOrNull → T?
-
Available on Iterable<
Returns the first element.T> , provided by the IterableExtensions extensionno setter - lastOrNull → T?
-
Available on Iterable<
Returns the last element.T> , provided by the IterableExtensions extensionno setter
Methods
-
containsAll(
Iterable< Object?> elements) → bool -
Available on Iterable<
ReturnsT> , provided by the IterableExtensions extensiontrueif Iterable contains allelements. -
containsAny(
Iterable< Object?> elements) → bool -
Available on Iterable<
ReturnsT> , provided by the IterableExtensions extensiontrueif Iterable contains any ofelements. -
distinct(
[Object? key(T element)?]) → List< T> -
Available on Iterable<
Deletes duplicate elements in an array.T> , provided by the IterableExtensions extension -
equalsTo(
Iterable< T> others) → bool -
Available on Iterable<
ReturnsT> , provided by the IterableExtensions extensiontrueif the internals of Iterable andothersare compared and match. -
expandAndRemoveEmpty<
TCast> (Iterable< TCast?> callback(T item)) → List<TCast> -
Available on Iterable<
Each element of the list is converted toT> , provided by the IterableExtensions extensionTCastdata usingcallback. -
firstWhereOrNull(
bool test(T item)) → T? -
Available on Iterable<
Returns the first element for which the return value ofT> , provided by the IterableExtensions extensiontestistrue. -
insertEvery(
T value, int per) → Iterable< T> -
Available on Iterable<
Inserts aT> , provided by the IterableExtensions extensionvalueelement for eachperof Iterable. -
lastWhereOrNull(
bool test(T item)) → T? -
Available on Iterable<
Returns the last element for which the return value ofT> , provided by the IterableExtensions extensiontestistrue. -
limit(
int start, int end) → List< T> -
Available on Iterable<
Extract only the elements fromT> , provided by the IterableExtensions extensionstarttoendof Iterable. -
limitEnd(
int end) → List< T> -
Available on Iterable<
Extract only the elements toT> , provided by the IterableExtensions extensionendof Iterable. -
limitStart(
int start) → List< T> -
Available on Iterable<
Extract only the elements fromT> , provided by the IterableExtensions extensionstartof Iterable. -
mapAndRemoveEmpty<
TCast> (TCast? callback(T item)) → List< TCast> -
Available on Iterable<
Each element of the list is converted toT> , provided by the IterableExtensions extensionTCastdata usingcallback. -
print(
) → void -
Available on Iterable<
print the entire contents of List.T> , provided by the IterableExtensions extension -
setWhere<
K extends Object> (Iterable< T> others, {required bool test(T original, T other), required K? apply(T original, T other), K? orElse(T original)?}) → Iterable<K> -
Available on Iterable<
IfT> , provided by the IterableExtensions extensionothersis given to Iterable and the return value oftestistrue, the return value ofapplyis replaced with the corresponding value of Iterable. -
split(
int length) → Iterable< Iterable< T> > -
Available on Iterable<
Iterable is divided intoT> , provided by the IterableExtensions extensionlengthelements each, creating a list of lists. -
splitWhere(
bool test(T a, T b)) → Iterable< Iterable< T> > -
Available on Iterable<
Groups Iterable together with elements that have a return value ofT> , provided by the IterableExtensions extensiontruefortestand returns a list of each group. -
toMap<
K, V> (MapEntry< K, V> ? f(T item)) → Map<K, V> -
Available on Iterable<
The callback given byT> , provided by the IterableExtensions extensionffrom Iterable will create a map ofKandV.