title: How to sum values in a Map with a stream?
body: <p>I want the equivalent of this with a stream:</p>
  
  <pre><code>public static &lt;T extends Number&gt; T getSum(final Map&lt;String, T&gt; data) {
      T sum = 0;
      for (String key: data.keySet())
          sum += data.get(key);
      return sum;
  }
  </code></pre>
  
  <p>This code doesn't actually compile because 0 cannot be assigned to type T, but you get the idea.</p>