Klasse MultiRightPairFlux<LeftT,RightT>
java.lang.Object
de.kamillionlabs.hateoflux.utility.pair.MultiRightPairFlux<LeftT,RightT>
- Typparameter:
LeftT- the type of the left element in the pairRightT- the type of the right elements in the pair
Wraps a
Flux of MultiRightPair objects, providing convenient factory methods to create reactive
streams of pairs.- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <LeftT,RightT>
MultiRightPairFlux<LeftT, RightT> empty()Creates an emptyMultiRightPair.static <LeftT> MultiRightPairFlux.Builder<LeftT> from(reactor.core.publisher.Flux<LeftT> flux) Initiates building aMultiRightPairFluxby providing the firstFlux.static <LeftT,RightT>
MultiRightPairFlux<LeftT, RightT> fromIterable(Iterable<MultiRightPair<LeftT, RightT>> iterable) Creates aMultiRightPairFluxfrom anIterableofMultiRightPairobjects (e.g. from aMultiRightPairList).static <LeftT,RightT>
MultiRightPairFlux<LeftT, RightT> of(reactor.core.publisher.Flux<MultiRightPair<LeftT, RightT>> flux) static <LeftT,RightT>
MultiRightPairFlux<LeftT, RightT> zipWith(reactor.core.publisher.Flux<LeftT> leftFlux, Function<LeftT, reactor.core.publisher.Flux<RightT>> rightMapper)
-
Methodendetails
-
empty
Creates an emptyMultiRightPair.- Typparameter:
LeftT- the type of the left element in the pairRightT- the type of the right element in the pair- Gibt zurück:
- a new empty
MultiRightPairinstance
-
of
public static <LeftT,RightT> MultiRightPairFlux<LeftT,RightT> of(reactor.core.publisher.Flux<MultiRightPair<LeftT, RightT>> flux) - Typparameter:
LeftT- the type of the left element in the pairRightT- the type of the right elements in the pair- Parameter:
flux- theFluxemittingMultiRightPairobjects- Gibt zurück:
- a new
PairFluxinstance wrapping the providedFlux
-
fromIterable
public static <LeftT,RightT> MultiRightPairFlux<LeftT,RightT> fromIterable(Iterable<MultiRightPair<LeftT, RightT>> iterable) Creates aMultiRightPairFluxfrom anIterableofMultiRightPairobjects (e.g. from aMultiRightPairList).- Typparameter:
LeftT- the type of the left element in the pairRightT- the type of the right elements in the pair- Parameter:
iterable- theIterablecontainingMultiRightPairobjects- Gibt zurück:
- a new
MultiRightPairFluxemitting the pairs from the providedIterable
-
zipWith
public static <LeftT,RightT> MultiRightPairFlux<LeftT,RightT> zipWith(reactor.core.publisher.Flux<LeftT> leftFlux, Function<LeftT, reactor.core.publisher.Flux<RightT>> rightMapper) Zips aFluxof left elements with aFluxof right elements into aMultiRightPairFlux.Usage example:
Flux<Author> japaneseAuthors = getAuthorsFrom("Japan"); // given getBooksOfAuthor() returns Flux<Book> MultiRightPairFlux<Author, Book> authorsWithTheirBooks = MultiRightPairFlux.zipWith(japaneseAuthors, author -> getBooksOfAuthor(author.getName()));- Typparameter:
LeftT- the type of the left element in the pairRightT- the type of the right elements in the pair- Parameter:
leftFlux- theFluxemitting the left elementsrightMapper- a function that maps each left element to aFluxemitting corresponding right elements- Gibt zurück:
- a new
MultiRightPairFluxinstance emitting paired elements
-
from
public static <LeftT> MultiRightPairFlux.Builder<LeftT> from(reactor.core.publisher.Flux<LeftT> flux) Initiates building aMultiRightPairFluxby providing the firstFlux. Should be used withMultiRightPairFlux.Builder.with(java.util.function.Function<LeftT, reactor.core.publisher.Flux<RightT>>).Usage example:
Flux<Author> japaneseAuthors = getAuthorsFrom("Japan"); // given getBooksOfAuthor() returns Flux<Book> MultiRightPairFlux<Author, Book> authorsWithTheirBooks = MultiRightPairFlux.from(japaneseAuthors) .with(author -> getBooksOfAuthor(author.getName()));- Typparameter:
LeftT- the type of the left element in the pair- Parameter:
flux- theFluxemitting the left elements- Gibt zurück:
- a
MultiRightPairFlux.Builderto continue building theMultiRightPairFlux
-