T
- the source Single's value typeR
- the transformed Single's value typepublic static interface Single.Transformer<T,R> extends Func1<Single<T>,Single<R>>
Single.compose(rx.Single.Transformer<? super T, ? extends R>)
.
Transformer<Integer, Integer> transformer = s -> s.subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()); Single.just(1) .compose(transformer) .subscribe(System.out::println);