title: Why don't primitive Stream have collect(Collector)?
body: <p>I'm writing a library for novice programmers so I'm trying to keep the API as clean as possible.</p>
  
  <p>One of the things my Library needs to do is perform some complex computations on a large collection of ints or longs.  There are lots of scenarios and business objects that my users need to compute these values from, so I thought the best way would be to use streams to allow users to map business objects to <code>IntStream</code> or <code>LongStream</code> and then compute the computations inside of a collector.  </p>
  
  <p>However IntStream and LongStream only have the 3 parameter collect method:</p>
  
  <pre><code>collect(Supplier&lt;R&gt; supplier, ObjIntConsumer&lt;R&gt; accumulator, BiConsumer&lt;R,R&gt; combiner)
  </code></pre>
  
  <p>And doesn't have the simplier <code>collect(Collector)</code> method that <code>Stream&lt;T&gt;</code> has.</p>
  
  <p>So instead of being able to do</p>
  
  <pre><code>Collection&lt;T&gt; businessObjs = ...
  MyResult result = businessObjs.stream()
                                .mapToInt( ... )
                                .collect( new MyComplexComputation(...));
  </code></pre>
  
  <p>I have to do provide Suppliers, accumulators and combiners like this:</p>
  
  <pre><code>MyResult result = businessObjs.stream()
                                .mapToInt( ... )
                                .collect( 
                                    ()-&gt; new MyComplexComputationBuilder(...),
                                    (builder, v)-&gt; builder.add(v),
                                    (a,b)-&gt; a.merge(b))
                                .build(); //prev collect returns Builder object
  </code></pre>
  
  <p>This is way too complicated for my novice users and is very error prone.</p>
  
  <p>My work around is to make static methods that take an <code>IntStream</code> or <code>LongStream</code> as input and hide the collector creation and execution for you </p>
  
  <pre><code>public static MyResult compute(IntStream stream, ...){
         return .collect( 
                          ()-&gt; new MyComplexComputationBuilder(...),
                          (builder, v)-&gt; builder.add(v),
                          (a,b)-&gt; a.merge(b))
                 .build();
  }
  </code></pre>
  
  <p>But that doesn't follow the normal conventions of working with Streams:</p>
  
  <pre><code>IntStream tmpStream = businessObjs.stream()
                                .mapToInt( ... );
  
   MyResult result = MyUtil.compute(tmpStream, ...);
  </code></pre>
  
  <p>Because you have to either save a temp variable and pass that to the static method, or create the Stream inside the static call which may be confusing when it's is mixed in with the other parameters to my computation.</p>
  
  <p>Is there a cleaner way to do this while still working with <code>IntStream</code> or <code>LongStream</code> ?</p>