I am very new to reactive-streams, Can someone help me to convert Mono<MyClass>
to Flux<Integer>
I tried something like this -
Flux<Integer> myMethod(Mono<MyClass> homeWork) {
return homeWork.map(h -> h.multiplicands)
.flatMapMany(Flux::fromIterable).map(m -> h*m);
}
public class MyClass{
int multiplier;
List<Integer> multiplicands;
}
I am expecting the result of multiplier * (each) multiplicand in Flux<Integer>
format.
Can you help me with the correct way of doing this?
`