Kactoos

kactoos-jvm / nnl.rocks.kactoos.scalar / FirstOf / <init>

<init>

FirstOf(condition: Func<T, Boolean>, source: Iterable<T>, fallback: Scalar<T>)

Find first element in a list that satisfies specified condition.

There is no thread-safety guarantee.

Parameters

T - Type of result

condition - Condition for getting the element

source - Source iterable

fallback - Fallback used if no value matches

Since 0.4