June 2017
Intermediate to advanced
400 pages
8h 44m
English
When you create your own ObservableOperator, you will most likely want to create a FlowableOperator counterpart as well. This way, your operator can be used for both Observables and Flowables. Thankfully, FlowableOperator is implemented in a similar manner to ObservableOperator, as shown here:
import io.reactivex.Flowable; import io.reactivex.FlowableOperator; import io.reactivex.functions.Action; import io.reactivex.subscribers.DisposableSubscriber; import org.reactivestreams.Subscriber; public class Launcher { public static void main(String[] args) { Flowable.range(1, 5) .lift(doOnEmpty(() -> System.out.println("Operation 1 Empty!"))) .subscribe(v -> System.out.println("Operation 1: " + v)); Flowable.<Integer>empty()Read now
Unlock full access