@Test public void empty() { TestSubscriber<Integer> ts = new TestSubscriber<>(); Multi.<Integer>empty() .flatMap(Single::just) .subscribe(ts); assertThat(ts.getItems().isEmpty(), is(true)); assertThat(ts.getLastError(), is(nullValue())); assertThat(ts.isComplete(), is(true)); }
@Override public void subscribe(Flow.Subscriber<? super R> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); source.subscribe(new FlatMapSubscriber<>(subscriber, mapper, maxConcurrency, prefetch, delayErrors)); }
MultiFlatMapPublisher implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); source.subscribe(new FlatMapSubscriber<>(subscriber, mapper, maxConcurrency, prefetch, delayErrors)); } }
MultiFlatMapPublisher implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); source.subscribe(new FlatMapSubscriber<>(subscriber, mapper, maxConcurrency, prefetch, delayErrors)); } MultiFlatMapPublisher(Multi<T> source,
                          Function<? super T, ? extends Flow.Publisher<? extends R>> mapper,
                          long maxConcurrency, long prefetch, boolean delayErrors); }
MultiFlatMapPublisher implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); source.subscribe(new FlatMapSubscriber<>(subscriber, mapper, maxConcurrency, prefetch, delayErrors)); } MultiFlatMapPublisher(Multi<T> source,
                          Function<? super T, ? extends Flow.Publisher<? extends R>> mapper,
                          long maxConcurrency, long prefetch, boolean delayErrors); @Override void subscribe(Flow.Subscriber<? super R> subscriber); }
MultiFlatMapPublisher implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); source.subscribe(new FlatMapSubscriber<>(subscriber, mapper, maxConcurrency, prefetch, delayErrors)); } MultiFlatMapPublisher(Multi<T> source,
                          Function<? super T, ? extends Flow.Publisher<? extends R>> mapper,
                          long maxConcurrency, long prefetch, boolean delayErrors); @Override void subscribe(Flow.Subscriber<? super R> subscriber);  }