The rxjava doc definition of switchmap is rather vague and it links to the same page as flatmap. What is the difference between the two operators?
Map, FlatMap, ConcatMap and SwitchMap applies a function or modifies the data emitted by an Observable.
Map modifies each item emitted by a source Observable and emits the modified item.
FlatMap, SwitchMap and ConcatMap also applies a function on each emitted item but instead of returning the modified item, it returns the Observable itself which can emit data again.
FlatMap and ConcatMap work is pretty much same. They merge items emitted by multiple Observables and returns a single Observable.