Klasse PairFlux.Builder<LeftT>
java.lang.Object
de.kamillionlabs.hateoflux.utility.pair.PairFlux.Builder<LeftT>
- Typparameter:
LeftT- the type of the left element in the pair
Builder class for
PairFlux.-
Methodenübersicht
-
Methodendetails
-
with
public <RightT> PairFlux<LeftT,RightT> with(Function<LeftT, reactor.core.publisher.Mono<RightT>> mapper) Specifies how to map each element to the right element of the pair asynchronously.Usage example:
Flux<Book> books = getBooksOnTopic("coding"); // given getAuthorByBookTitle() returns Mono< Author> PairFlux<Book, Author> pairFlux = PairFlux.from(books) .with(book -> getAuthorByBookTitle(book.getTitle()));- Typparameter:
RightT- the type of the right element in the pair- Parameter:
mapper- a function that maps each element to aMonoemitting the right element- Gibt zurück:
- a new
PairFluxinstance emitting paired elements
-