autodispose-lifecycle / com.uber.autodispose.lifecycle / CorrespondingEventsFunction / apply

apply

abstract fun apply(event: E): E

Given an event event, returns the next corresponding event that this lifecycle should dispose on.

Parameters

event - the source or start event.

Exceptions

OutsideScopeException - if the lifecycle exceeds its scope boundaries.

Return
the target event that should signal disposal.