Combine StreamSupport.stream/parallelStream?
Brian Goetz
brian.goetz at oracle.com
Thu Jun 27 13:43:30 PDT 2013
A possible minor API cleanup:
For each pair of low-level methods stream() and parallelStream() in
StreamSupport, we could combine these into a single method that takes an
additional boolean isParallel argument. This matches the underlying
implementation they call anyway, and simplifies callers like concat,
which now does:
return (a.isParallel() || b.isParallel())
? StreamSupport.parallelStream(split)
: StreamSupport.stream(split);
anyway.
More information about the lambda-libs-spec-experts
mailing list