public < U , C extends Collection < U > > C toFlatCollection ( Function < ? super T , ? extends Collection < U > > mapper , Supplier < C > supplier ) { return map ( mapper ) . collect ( supplier , Collection :: addAll , Collection :: addAll ) ; }
Returns a collection created by provided supplier function which contains all the elements of the collections generated by provided mapper from each element of this stream .