- Hands-On Reactive Programming in Spring 5
- Oleh Dokuka Igor Lozynskyi
- 178字
- 2021-07-23 16:36:22
Map operator
Unquestioningly, the most used operator in RxJava is map, which has the following signature:
<R> Observable<R> map(Func1<T, R> func)
The preceding method declaration means that the func function can transform the T object type to the R object type, and applying map transforms Observable<T> into Observable<R>. However, a signature does not always describe the operator's behavior well, especially if the operator is doing a complex transformation. For these purposes, Marble diagrams were invented. Marble diagrams visually present stream transformations. They are so effective for describing the operator's behavior that almost all RxJava operators contain the image with a marble diagram in Javadoc. The map operator is represented by the following diagram:

From looking at the preceding diagram, it should be clear that the map makes a one-to-one transformation. Furthermore, the output stream has the same number of elements as the input stream.
- 重新定義Spring Cloud實(shí)戰(zhàn)
- 新一代物聯(lián)網(wǎng)架構(gòu)技術(shù):分層算力網(wǎng)絡(luò)
- Learning Karaf Cellar
- Go Web Scraping Quick Start Guide
- Building RESTful Web Services with Spring 5(Second Edition)
- NB-IoT物聯(lián)網(wǎng)技術(shù)解析與案例詳解
- 2018網(wǎng)信發(fā)展報(bào)告
- 面向5G-Advanced的關(guān)鍵技術(shù)
- 通信十年:擁抱互聯(lián)網(wǎng)
- 網(wǎng)絡(luò)工程實(shí)施技術(shù)與方案大全
- 華為HCIA-Datacom認(rèn)證指南
- 人際網(wǎng)絡(luò)
- 趣話通信:6G的前世、今生和未來(lái)
- 網(wǎng)絡(luò)互聯(lián)技術(shù)(理論篇)
- 網(wǎng)絡(luò)空間作戰(zhàn):機(jī)理與籌劃