I'm trying to get a List of Components that belongs to a given List of Projects.
Since I'm starting working with stream, I cannot figure out how to do this.
projects.stream()
.map(p -> p.getComponents())
.collect(Collectors.toList());
Since Project.getComponents() returns a Collection<ProjectComponent> the previous code will return a List<Collection<ProjectComponent>> however I wanted to return a List<ProjectComponent> how can I do this?
Kind Regards.