NullableIterableExtensions<T> extension

Provides an extension method for Iterable that is nullable.

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

on

Properties

firstOrNull → T?

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns the first element.
no setter
isEmpty bool

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Whether this collection has no elements.
no setter
isNotEmpty bool

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Whether this collection has at least one element.
no setter
lastOrNull → T?

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns the last element.
no setter
length int

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns the number of elements in Iterable.
no setter

Methods

contains(Object? element) bool

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Whether the collection contains an element equal to element.
containsAll(Iterable<Object?> elements) bool

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns true if Iterable contains all elements.
containsAny(Iterable<Object?> elements) bool

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns true if Iterable contains any of elements.
equalsTo(Iterable<T>? others) bool

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns true if the internals of Iterable and others are compared and match.
fill(int length, T generator(int index)) Iterable<T>

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

If length is greater than the current number, returns Iterable filled with elements generated by generator.
firstWhereOrNull(bool test(T item)) → T?

Available on Iterable<T>?, provided by the NullableIterableExtensions extension

Returns the first element for which the return value of test is true.