takeWhile

fun takeWhile(predicate: T.() -> Boolean): EventBuilder<T>

Keeps the listener registered as long as the predicate returns true.

Parameters

predicate

A predicate that determines whether to keep the listener.