I'm in a bizarre situation. Is there anyway to stream a List to a map with identical values?
i.e.
let a be of type Map< Integer, List< String > >
let's say b is just a list of integers that correspond to the keys of a.
b.stream().map(x ->
a.get(x).stream()
.collect(
Collectors.toMap(i -> i, x);
)
);
I want a map where all the values are an x and all the keys are from the values in b.
The above function is supposed to return a Stream< List< Map< String, Int > > > (obviously it doesn't work)