February 2020
Intermediate to advanced
412 pages
9h 36m
English
When you implement your own ObservableTransformer, you might want to create a FlowableTransformer counterpart as well. This way, you can use your operator on both—Observable and Flowable.
FlowableTransformer is not much different to ObservableTransformer. Of course, it supports backpressure since it is composed of Flowable operators. Otherwise, it is pretty much the same in its usage except that you obviously pass it to compose() on a Flowable, not an Observable.
Here, we take our toImmutableList() method returning an ObservableTransformer and implement it as a FlowableTransformer instead:
import com.google.common.collect.ImmutableList;import io.reactivex.rxjava3.core.Flowable;import io.reactivex.rxjava3.core.Flowable ...
Read now
Unlock full access