Stream concatenation sugestion

Boaz Nahum boaznahum at gmail.com
Tue Apr 2 06:31:34 PDT 2013


I want to join the request.
I already have the need to implenet it by myself.

I would to add
*    @SafeVarargs
*    public static <T> Stream<T> concat(Stream<? extends T> ...
streams, *boolean
parallel*) {

Because the decision:

return (a.isParallel() || b.isParallel())
               ? parallelStream(split)
               : stream(split);

is sometimes just wrong. Two streams can be 'sequential' but processed in
parallel ?

[Of course one always do concat(s1,s2).parallel()  ]




On Tue, Apr 2, 2013 at 4:18 PM, Jose <jgetino at telefonica.net> wrote:

>
>
> Please, consider allowing varag argument in stream concatenation
>
> Stream<T> concat(Stream<? extends T> ...streams)
>
> It would save repetitive code in some cases.
>
>
> Regards
>
>
>


More information about the lambda-dev mailing list