In my Java project (with Spring), I have the following Map and try to convert it to List<T>, but it returns List<List<T>> with the following stream(). So, how can I convert Map<Long, List<T>> to List<T> in Java using stream()?
final Set<UUID> set = demoMap.keySet();
final Map<UUID, List<EmployeeDTO>> employeeMap = demoService
.getEmployees(new ArrayList<>(set));
List<EmployeeDTO> employeeList = employeeMap.values()
.stream()
.collect(Collectors.toList());