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.
firstWhereOrNull(bool test(T item)) → T?
Returns the first element for which the return value of test is true.