switchMapMaybe

fun <T, R> Observable<T>.switchMapMaybe(mapper: (T) -> Maybe<R>): Observable<R>

Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Maybe, disposing any previously subscribed inner Maybe. Emits elements from inner Maybes.

Please refer to the corresponding RxJava document.


fun <T, U, R> Observable<T>.switchMapMaybe(mapper: (T) -> Maybe<U>, resultSelector: (T, U) -> R): Observable<R>

Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Maybe, disposing any previously subscribed inner Maybe. Emits elements from inner Maybes. For an element U emitted by an inner Maybe, calls resultSelector with the original source element T and the inner element U, and emits the result element R.

Please refer to the corresponding RxJava document.