The stream abstraction and substream()
Paul Sandoz
paul.sandoz at oracle.com
Wed Apr 3 02:23:15 PDT 2013
On Apr 3, 2013, at 11:05 AM, Jose <jgetino at telefonica.net> wrote:
>
>>> Yes, parallel evaluation. What order should elements be reported to the
> consumer?
>
> Agreed, in a parallel stream the order would be arbitrary.
>
> But this is also the case of:
>
> forEach(Consumer<T>)
>
>
> In my view
> substream(long n, Consumer<T>)
>
Just do limit(n).forEach(...)
Paul.
> is just a forEach(), but limited to n elments. And this method could also be
> used to skip them, like in the current implementation.
>
>
>
More information about the lambda-dev
mailing list