android-components / mozilla.components.support.base.observer / ConsumableStream / consumeAllBy

consumeAllBy

@Synchronized fun consumeAllBy(consumers: List<(T) -> Boolean>): Boolean (source)

Invokes the given list of lambdas for each consumable value and marks the values as consumed if at least one lambda returns true.

Parameters

consumers - the lambdas accepting a consumable value.

Return
true if all consumables were consumed, otherwise false.