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

firstOrNull

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

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

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> Field<Sequence<T>>.firstOrNull(): Field<T?>
fun <T> Field<Sequence<T>>.firstOrNull(predicate: (T) -> Boolean): Field<T?>

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

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 Field<String>.firstOrNull(): Field<Char?>
fun Field<String>.firstOrNull(predicate: (Char) -> Boolean): Field<Char?>

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

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