How to flatmap a stream of streams in Java? [duplicate]

Basically, you want to concatenate all the nested streams into one flat stream, without affecting the members themselves. You’ll use

objectStreams.flatMap(Function.identity());

because you must provide some mapping function for each stream member, and in this case it is the identity function.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)