code: public static <T> Collector<Collection<T>, List<T>, List<T>> toFlatList() {
          return Collector.of(
                  ArrayList::new,
                  List::addAll,
                  (left, right) -> {
                      left.addAll(right);
                      return left;
                  });
      }
docs: Flattening collector.
  Look at StreamCollectorsTest for example usage
  
  
  @param <T> type of elements in the collections
  @return flattened list of elements from all of the collections