title: Java 8 List of Objects to Map<String, List> of values
body: <p>I am trying to convert <code>List&lt;Object&gt;</code> to <code>Map&lt;String, List&gt;</code> using <code>Streams</code>,</p>
  
  <pre><code>public class User{
     String name;
     String age;
     String org;
  }
  </code></pre>
  
  <p>I have <code>List&lt;Users&gt;</code>, and need to collect into <code>Map&lt;String, Object&gt; m</code>, </p>
  
  <pre><code> m.put("names", List of names,);
   m.put("age", List of age);
   m.put("org", List of org);
  </code></pre>
  
  <p>to be use in named query -> eg: <code>select * from table ... where names in (:names) and age in (:age) and org in (:org)</code></p>
  
  <p>as of now I am doing like</p>
  
  <pre><code>List&lt;String&gt; names = userList.stream().map(User::getName).collect(Collectors.toList());
  List&lt;String&gt; age= userList.stream().map(User::getAge).collect(Collectors.toList());
  List&lt;String&gt; org= userList.stream().map(User::getName).collect(Collectors.toList());
  </code></pre>
  
  <p>How to collect all the values while streaming to the list only once ?</p>