-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy motorro/RxLceModel to github.com/motorro/RxLceModel.git:master
- Loading branch information
1 parent
be1ec04
commit 9479d2e
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
docs/com.motorro.rxlcemodel.base/io.reactivex.-observable/flat-map-single-data.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[com.motorro.rxlcemodel.base](../index.md) / [io.reactivex.Observable](index.md) / [flatMapSingleData](./flat-map-single-data.md) | ||
|
||
# flatMapSingleData | ||
|
||
`fun <DATA_1 : `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, DATA_2 : `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`> `[`Observable`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html)`<`[`LceState`](../-lce-state/index.md)`<`[`DATA_1`](flat-map-single-data.md#DATA_1)`>>.flatMapSingleData(mapper: (data: `[`DATA_1`](flat-map-single-data.md#DATA_1)`) -> `[`Single`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Single.html)`<`[`DATA_2`](flat-map-single-data.md#DATA_2)`>): `[`Observable`](http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html)`<`[`LceState`](../-lce-state/index.md)`<`[`DATA_2`](flat-map-single-data.md#DATA_2)`>>` | ||
|
||
Maps each [DATA_1](flat-map-single-data.md#DATA_1) to single for [DATA_2](flat-map-single-data.md#DATA_2) and merges back to LceState. | ||
If error occurs in [mapper](flat-map-single-data.md#com.motorro.rxlcemodel.base$flatMapSingleData(io.reactivex.Observable((com.motorro.rxlcemodel.base.LceState((com.motorro.rxlcemodel.base.flatMapSingleData.DATA_1)))), kotlin.Function1((com.motorro.rxlcemodel.base.flatMapSingleData.DATA_1, io.reactivex.Single((com.motorro.rxlcemodel.base.flatMapSingleData.DATA_2)))))/mapper) emits [LceState.Error](../-lce-state/-error/index.md). | ||
Example: load some [DATA_2](flat-map-single-data.md#DATA_2) from server using original [DATA_1](flat-map-single-data.md#DATA_1) as a parameter. | ||
|
||
### Parameters | ||
|
||
`DATA_1` - Source data type | ||
|
||
`DATA_2` - Resulting data type | ||
|
||
`mapper` - Data mapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters