Fwd: Re: Stream.limit() - puzzler/bug/feature
Remi Forax
forax at univ-mlv.fr
Fri Nov 16 08:42:29 PST 2012
On 11/16/2012 03:59 PM, Brian Goetz wrote:
>> BTW, I'm still not sure we should not provide a method iterator() to be
>> able to 'upgrade' to the iterator semantics
>> (for the parallel implementation iterator() will be equivalent to
>> sequential().iterator()).
>
> For that case we also have to provide a spliterator() method.
if we provide a spliterator(), we don't need the method iterator()
because one can call spliterator().iterator().
But again, I'm not sure we should provide these methods,
I have no idea if it worth the pain to have to implement it for all streams.
Rémi
More information about the lambda-libs-spec-observers
mailing list