title: Sorting (a stream of) doubles by absolute magnitude
body: <p>I have a series of double values which I want to sum up and get the maximum value.
  The <code>DoubleStream.summaryStatistics()</code> sounds perfect for that.
  The <code>getSum()</code> method has an API note reminding me of what I learned during one of my computer science courses: the stability of the summation problem tends to be better if the values are sorted by their absolute values. However, <code>DoubleStream</code> does not let me specify the comparator to use, it will just use <code>Double.compareTo</code> if I call <code>sorted()</code> on the stream.</p>
  
  <p>Thus I gathered the values into a <code>final Stream.Builder&lt;Double&gt; values = Stream.builder();</code> and call</p>
  
  <pre><code>values.build()
      .sorted(Comparator.comparingDouble(Math::abs))
      .mapToDouble(a -&gt; a).summaryStatistics();
  </code></pre>
  
  <p>Yet, this looks somewhat lengthy and I would have preferred to use the <code>DoubleStream.Builder</code> instead of the generic builder.
  Did I miss something or do I really have to use the boxed version of the stream just to be able to specify the comparator?</p>