title: Default Value for Map in Collectors.toMap()
body: <p>Need to convert <code>List&lt;Object&gt;</code> to <code>Map&lt;String,Long&gt;</code> with Long value as zero using <code>Collectors.toMap()</code>.</p>
  
  <p>Here Object refers to my own defined java class. </p>
  
  <pre><code>List&lt;Test&gt; list = new ArrayList&lt;Test&gt;(); list.add(X); list.add(Y);
  Map&lt;String,Long&gt; map = list.stream().collect(Collectors.toMap(Test:getName,XXXX)));
  </code></pre>
  
  <p>My Expected Output:</p>
  
  <pre><code>{"x",0},{"Y",0}
  </code></pre>