title: Java 8 lambdas group list into map
body: <p>I want to take a <code>List&lt;Pojo&gt;</code> and <code>return</code> a <code>Map&lt;String, List&lt;Pojo&gt;&gt;</code> where the <code>Map</code>'s key is a <code>String</code> value in <code>Pojo</code>, let's call it <code>String key</code>.</p>
  
  <p>To clarify, given the following:</p>
  
  <p>Pojo 1: Key:a value:1</p>
  
  <p>Pojo 2: Key:a value:2</p>
  
  <p>Pojo 3: Key:b value:3</p>
  
  <p>Pojo 4: Key:b value:4</p>
  
  <p>I want a <code>Map&lt;String, List&lt;Pojo&gt;&gt;</code> with <code>keySet()</code> sized 2, where key "a" has Pojos 1 and 2, and key "b" has pojos 3 and 4.</p>
  
  <p>How could I best achieve this using Java 8 lambdas?</p>