Documentation / dataflow-async / com.femastudios.dataflow.async.extensions / firstOrNull
Go to reference

firstOrNull

fun <T> Attribute<Iterable<T>>.firstOrNull(): Attribute<T?>
fun <T> Attribute<Iterable<T>>.firstOrNull(predicate: (T) -> Boolean): Attribute<T?>
fun <T> Attribute<List<T>>.firstOrNull(): Attribute<T?>

Same as firstOrNull, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling firstOrNull in the transformation function.

This is simply a convenience function.

See Also

kotlin.collections.firstOrNull


fun <T> Attribute<Sequence<T>>.firstOrNull(): Attribute<T?>
fun <T> Attribute<Sequence<T>>.firstOrNull(predicate: (T) -> Boolean): Attribute<T?>

Same as firstOrNull, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling firstOrNull in the transformation function.

This is simply a convenience function.

See Also

kotlin.sequences.firstOrNull


fun Attribute<String>.firstOrNull(): Attribute<Char?>
fun Attribute<String>.firstOrNull(predicate: (Char) -> Boolean): Attribute<Char?>

Same as firstOrNull, but accepts Attribute and returns a new Attribute.

Calling this function is equivalent to use transform and calling firstOrNull in the transformation function.

This is simply a convenience function.

See Also

kotlin.text.firstOrNull