RequireNoNullsKtIterableExtension<T> extension

on

Methods

filterNotNull() KtList<T>

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Returns a list containing all elements that are not null.
filterNotNullTo<C extends KtMutableCollection>(C destination) → C

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Appends all elements that are not null to the given destination.
mapIndexedNotNull<R>(R? transform(int index, T?)) KtList<R>

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Returns a list containing only the non-null results of applying the given transform function to each element and its index in the original collection. @param transform function that takes the index of an element and the element itself and returns the result of the transform applied to the element.
mapIndexedNotNullTo<R, C extends KtMutableCollection<R>>(C destination, R? transform(int index, T?)) → C

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Applies the given transform function to each element and its index in the original collection and appends only the non-null results to the given destination. @param transform function that takes the index of an element and the element itself and returns the result of the transform applied to the element.
mapNotNull<R>(R? transform(T?)) KtList<R>

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Returns a list containing the results of applying the given transform function to each element in the original collection.
mapNotNullTo<R, C extends KtMutableCollection<R>>(C destination, R? transform(T?)) → C

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Applies the given transform function to each element in the original collection and appends only the non-null results to the given destination.
requireNoNulls() KtIterable<T>

Available on KtIterable<T?>, provided by the RequireNoNullsKtIterableExtension extension

Returns an original collection containing all the non-null elements, throwing an ArgumentError if there are any null elements.