I would like to know if it is possible to combine data in different streams into one stream. By combining, I mean adding it to separate columns not to an existing column.
So far, I have been able to collect data on individual Maps, as shown in the example below. I believe that I should combine these Cards into one, but I’m not sure how to do it or I’m doing something wrong.
I did some searches, found some streams in FlatMap, Concat, etc., but since I am new to these Streams and Map functions, I am looking for a guide. (I currently work without using the Map / Streams function, just using the standard list with Add and AddALL)
For example: Data List - 1 Map<String, int> carMileage
- [carOne, 10]
- [carTwo, 20]
- [carThree, 25]
Data List - 2 Map<String, String> carGearBox
- [carThree, automatic]
- [carTwo manual]
- [carOne, mixed]
Data List - 3 Map<String, Double> carMaxSpeed
- [carTwo, 160.75]
- [carThree, 200.25]
- [carOne, 250.55]
Exit: [something like: Map<String, dataCar>]
- [carOne, 10, mixed, 250.55]
- [carTwo, 20, manual, 160.75]
- [carThree, 25, automatic, 200.25]
source
share