JavaStreamflatMap
map

flatMapStream

collect

Returns a stream by replacing each element with the contents of a mapped stream.

Syntax

stream.flatMap(mapper)