How can I convert multiple Streams into one Stream? For example, I have 3 IntStreams and I want to combine them into one Stream of int arrays.
In the Javadoc, most Stream operations take one stream as input, and the concat
doesn't answer my use case.
Here's what I had in mind
Stream 1: 1, 2, 3
Stream 2: 4, 5, 6
Combined Stream ex1: [1,4],[2,5],[3,6]
Combined Stream ex2: 1+4,2+5,3+6
Combined Stream ex3: new MyObject(1,4), new MyObject(2,5), new MyObject(3,6)