StreamSupport method consolidation

Paul Sandoz paul.sandoz at oracle.com
Thu Jul 4 00:21:59 PDT 2013


Hi,

I just pushed a change that consolidates the methods on StreamSupport:
 
  http://hg.openjdk.java.net/lambda/lambda/jdk/rev/33275b926f0d

  http://hg.openjdk.java.net/lambda/lambda/jdk/file/33275b926f0d/src/share/classes/java/util/stream/StreamSupport.java

There are now 4x of of spliterator-based and supplier-of-spliterator-based methods, and a boolean parameter controls whether the returned stream is sequential or parallel.

I contemplated the middle ground of having overloads of the spliterator-based methods with and without a boolean parameter but concluded after experimenting it was neater and less over-whelming to be consistent with 8 methods. 

Paul.



More information about the lambda-libs-spec-observers mailing list