Re: Stream from Iterable

Remi Forax forax at univ-mlv.fr
Tue Dec 11 08:00:56 PST 2012


That's the entrypoint.
In my opinion we need to add a default method stream() on Iterator.

Sent from my Phone

----- Reply message -----
From: "Stephen Colebourne" <scolebourne at joda.org>
To: "lambda-dev" <lambda-dev at openjdk.java.net>
Subject: Stream from Iterable
Date: Tue, Dec 11, 2012 16:27


On 11 December 2012 14:29, Brian Goetz <brian.goetz at oracle.com> wrote:
> Try this:
>
> Streams.stream(Streams.spliterator(iter.iterator(), sizeIfKnown),
>                 flags);
>
> You might want ORDERED as a flag.

That seems quite verbose for what seems like a common operation...

Stephen



More information about the lambda-dev mailing list