firstNotNull

open fun <T> firstNotNull(@NotNull mapper: @NotNull (RenderedBone) -> T): @Nullable T

Finds the first non-null result of applying a mapping function across all flattened bones.


RunningAnimation anim = pipeline.firstNotNull(RenderedBone::runningAnimation);

Return

the first non-null result produced by mapper, or null if none

Since

1.15.2

Parameters

mapper

the function to apply to each bone

<T>

the result type

Throws