RequireNoNullsKtIterableExtension<T> extension
- on
-
- KtIterable<
T?>
- KtIterable<
Methods
-
filterNotNull(
) → KtList< T> -
Available on KtIterable<
Returns a list containing all elements that are notT?> , provided by the RequireNoNullsKtIterableExtension extensionnull
. -
filterNotNullTo<
C extends KtMutableCollection> (C destination) → C -
Available on KtIterable<
Appends all elements that are notT?> , provided by the RequireNoNullsKtIterableExtension extensionnull
to the givendestination
. -
mapIndexedNotNull<
R> (R? transform(int index, T?)) → KtList< R> -
Available on KtIterable<
Returns a list containing only the non-null results of applying the givenT?> , provided by the RequireNoNullsKtIterableExtension extensiontransform
function to each element and its index in the original collection. @paramtransform
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<
Applies the givenT?> , provided by the RequireNoNullsKtIterableExtension extensiontransform
function to each element and its index in the original collection and appends only the non-null results to the givendestination
. @paramtransform
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<
Returns a list containing the results of applying the givenT?> , provided by the RequireNoNullsKtIterableExtension extensiontransform
function to each element in the original collection. -
mapNotNullTo<
R, C extends KtMutableCollection< (R> >C destination, R? transform(T?)) → C -
Available on KtIterable<
Applies the givenT?> , provided by the RequireNoNullsKtIterableExtension extensiontransform
function to each element in the original collection and appends only the non-null results to the givendestination
. -
requireNoNulls(
) → KtIterable< T> -
Available on KtIterable<
Returns an original collection containing all the non-T?> , provided by the RequireNoNullsKtIterableExtension extensionnull
elements, throwing an ArgumentError if there are anynull
elements.