Bu metodun 3 tane farklı imzası var. Bunlar şöyle
public final <R> Flux<R> flatMap(Function<? super T,? extends Publisher<? extends R>> mapper)public final <V> Flux<V> flatMap(Function<? super T,? extends Publisher<? extends V>> mapper,int concurrency)public final <V> Flux<V> flatMap(Function<? super T,? extends Publisher<? extends V>> mapper,int concurrency,int prefetch)
Örnek
Şöyle yaparız
Flux<Integer> numbers = Flux.just(1, 2, 3); Flux<String> letterFlux = numbers.flatMap(number -> Flux.just("A", "B").map(letter -> number + letter));
Hiç yorum yok:
Yorum Gönder