1
Notification.Kind在RxJava這是可以做到的:什麼替換RxJava2
Observable<Notification<Integer>> notifications = Observable
.just(3, 0, 2, 0, 1, 0)
.concatMapDelayError(x -> fromCallable(() -> 100/x))
.materialize();
List<Notification.Kind> kinds = notifications
.map(Notification::getKind)
.toList()
.toBlocking()
.single();
assertThat(kinds).containsExactly(OnNext, OnNext, OnNext, OnError);
什麼RxJava2這個替換?