flatMapSingle

fun <T, R> Observable<T>.flatMapSingle(maxConcurrency: Int = Int.MAX_VALUE, mapper: (T) -> Single<R>): Observable<R>

Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Single. Emits elements from inner Singles. The maximum number of concurrently subscribed inner Singles is determined by the maxConcurrency argument.

By default, all inner Singles are subscribed concurrently without any limits.

Please refer to the corresponding RxJava document.


fun <T, U, R> Observable<T>.flatMapSingle(maxConcurrency: Int = Int.MAX_VALUE, mapper: (T) -> Single<U>, resultSelector: (T, U) -> R): Observable<R>

Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Single. For an element U emitted by an inner Single, calls resultSelector with the original source element T and the inner element U, and emits the result element R. The maximum number of concurrently subscribed inner Singles is determined by the maxConcurrency argument.

By default, all inner Singles are subscribed concurrently without any limits.

Please refer to the corresponding RxJava document.