@Test public void limit() { TestSubscriber<Integer> ts = new TestSubscriber<>(Long.MAX_VALUE); Multi.just(1) .flatMapIterable(v -> range(5)) .limit(3) .subscribe(ts); ts.assertResult(0, 1, 2); }
@Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } MultiFlatMapIterable(Multi<T> source,
                         Function<? super T, ? extends Iterable<? extends R>> mapper,
                         int prefetch); }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } MultiFlatMapIterable(Multi<T> source,
                         Function<? super T, ? extends Iterable<? extends R>> mapper,
                         int prefetch); @Override void subscribe(Flow.Subscriber<? super R> subscriber); }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } MultiFlatMapIterable(Multi<T> source,
                         Function<? super T, ? extends Iterable<? extends R>> mapper,
                         int prefetch); @Override void subscribe(Flow.Subscriber<? super R> subscriber);  }