Reactive Programming with RxJava-Chapter3:Operators and Transformations(2)

来源:互联网 发布:淘宝找不到自己的品牌 编辑:程序博客网 时间:2024/05/16 08:40

More Than One Observable

Treating Several Observables as One Using merge()

merge()
merge()

mergeDelayError()
这里写图片描述

Pairwise Composing Using zip() and zipWith()

这里写图片描述

When Streams Are Not Synchronized with One Another:

  • combineLatest()
  • withLatestFrom()
  • amb()
    combineLatest()
    withLatestFrom()
    amb()

Advanced Operators:collect(),reduce(),scan(),distinct() and group()

Scanning Through the Sequence with Scan and Reduce

scan()

reduce()

Reduction with Mutable Accumulator:collect()

collect()

Asserting Observabele Has Exactly One Item Using single()

Dropping Duplicates Using distinct() and distinctUntilChanged()

distinct()

distinctUntilChanged()

最后,安利一款自己写的基于MVP的Android开发框架

https://github.com/sxenon/Pure
欢迎大家拍砖,如果觉得好,麻烦多多star

0 0
原创粉丝点击