question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.x: switchMapSingle and switchMapCompletable

See original GitHub issue

Hey,

the addition of flatMapSingle/flatMapCompletable made the usage of Single and Completable way nicer in RxJava 2. Do you consider adding switchMapSingle/switchMapCompletable to RxJava 2 as well?

Cheers

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:32 (18 by maintainers)

github_iconTop GitHub Comments

8reactions
vanniktechcommented, Nov 15, 2016

But then concatMap also needs the variants in order to be consistent. To be honest I forgot about those when proposing flatMapSingle / flatMapCompletable / flatMapMaybe initially - #4667

And then there’s also Maybe. Plus Observable and Flowable are able of mapping so it’s easily another 12 methods.

  • Observable.switchMapSingle
  • Observable.switchMapMaybe
  • Observable.switchMapCompletable
  • Observable.concatMapSingle
  • Observable.concatMapMaybe
  • Observable.concatMapCompletable
  • Flowable.switchMapSingle
  • Flowable.switchMapMaybe
  • Flowable.switchMapCompletable
  • Flowable.concatMapSingle
  • Flowable.concatMapMaybe
  • Flowable.concatMapCompletable
5reactions
davidmotencommented, Feb 17, 2017

I’m happy to have a look at this one if @tomaszpolanski doesn’t have time at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - 2.x: switchMapSingle and switchMapCompletable -
Coming soon: A brand new website interface for an even better experience!
Read more >
Observable (RxJava Javadoc 3.1.5) - ReactiveX
Maps the upstream items into MaybeSource s and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals)...
Read more >
FRP - RxJava - The Android Arsenal
Version 2.x. The 2.x version is end-of-life as of February 28, 2021. ... switchMap, switchMapSingle , switchMapMaybe , switchMapCompletable ...
Read more >
BehaviorSubject (RxJava Javadoc 2.2.10)
assertResult(2); // Observers coming after the subject was terminated ... put the result of getValue() into an array manually, will be removed in...
Read more >
What is the difference between flatmap and switchmap in ...
Do you know a real world example where switchMap would be used? – Julian Go. Jan 28, 2015 at 8:45. 2.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found