filterChannel

fun filterChannel(predicate: (T) -> Boolean): List<T>
fun filterChannel(predicate: Predicate<T>): List<T>

Finds the items in the channel according to the condition. Does not remove the items from the channel.

Return

a list of the items found. May be empty if nothing is found that matches the condition.

Parameters

predicate

the criteria for selecting the items