title: Map key value to an object in Java 8 stream
body: <p>Let's say I have this code:</p>
  
  <pre><code>Map&lt;String, String&gt; map;
  // later on
  map.entrySet().stream().map(MyObject::new).collect(Collectors.toList());
  </code></pre>
  
  <p>And I have a <code>MyObject</code> <code>Constructor</code> which takes two arguments of type <code>String</code>.
  I want to be able to do this but I cannot. 
  I know I can do <code>e -&gt; new MyObject(e.getKey(), e.getValue())</code> but prefer <code>MyObject::new</code>.</p>
  
  <p>Similar code works for <code>Set&lt;String&gt;</code> and <code>List&lt;String&gt;</code> with one argument constructor of <code>MyObject</code> class.</p>