title: java 8 stream collector mapping List<List> to List
body: <p>Lets say I have this class:</p>
  
  <pre><code>public class Employee{
  
    private int id;
    private List&lt;Car&gt; cars;
  //getters , equals and hashcode by id
  }
  
  public class Car {
    private String name;
  
  }
  </code></pre>
  
  <p>I have a List of Employees (same id may be duplicated):</p>
  
  <pre><code>List&lt;Employee&gt; emps =  ..
  
  Map&lt;Employee, List&lt;List&lt;Car&gt;&gt;&gt; resultMap = emps.stream().collect(
              Collectors.groupingBy(Function.identity(),
                      Collectors.mapping(Employee::getCars, Collectors.toList());
  </code></pre>
  
  <p>This gives me <code>Map&lt;Employee, List&lt;List&lt;Car&gt;&gt;&gt;</code>, 
  how can I get a <code>Map&lt;Employee, List&lt;Car&gt;</code> (like a flat List)?</p>