Arrays.parallel vs Arrays.asStream

Aleksey Shipilev aleksey.shipilev at
Fri Aug 31 09:14:44 PDT 2012


I found the inconsistency in API for Arrays in it2 branch:
  Arrays.asList(T... t)   // returns List<T>
  Arrays.parallel(T[] t)  // returns Stream<T> (parallel)
  Arrays.asStream(T... t) // returns Stream<T> (sequential?)

Two basic options:
 - rename parallel() to asParallel() or asParallelStream().
 - rename asStream() to sequential()

Also can be the mixture of both.


More information about the lambda-dev mailing list