NullableIterableExtensions<T> extension

Provides an extension method for Iterable that is nullable.

NullableなIterable用の拡張メソッドを提供します。

on

Properties

firstOrNull → T?
Returns the first element.
no setter
isEmpty bool
Whether this collection has no elements.
no setter
isNotEmpty bool
Whether this collection has at least one element.
no setter
lastOrNull → T?
Returns the last element.
no setter
length int
Returns the number of elements in Iterable.
no setter

Methods

contains(Object? element) bool
Whether the collection contains an element equal to element.
containsAll(Iterable<Object?> elements) bool
Returns true if Iterable contains all elements.
containsAny(Iterable<Object?> elements) bool
Returns true if Iterable contains any of elements.
equalsTo(Iterable<T>? others) bool
Returns true if the internals of Iterable and others are compared and match.
fill(int length, T generator(int index)) Iterable<T>
If length is greater than the current number, returns Iterable filled with elements generated by generator.
firstWhereOrNull(bool test(T item)) → T?
Returns the first element for which the return value of test is true.