expireWhen

abstract fun expireWhen(condition: Predicate<T>): EventListener.Builder<T>

Sets the condition that, if met, will cause the listener to be considered expired, and not have it run anymore.

Return

this builder

Parameters

condition

the expiry condition