Stream from Iterable

François Sarradin fsarradin at gmail.com
Tue Dec 11 12:48:56 PST 2012


In fact, I would like to performed bulk operations like map, reduce, or
groupBy on iterables. With update b56, I usually use stream(iter) to get
access to those operations. That's why my question was about Iterable into
Stream. But is there another (simpler?) way to access those operations from
an Iterable?


2012/12/11 Brian Goetz <brian.goetz at oracle.com>

> Try this:
>
> Streams.stream(Streams.**spliterator(iter.iterator(), sizeIfKnown),
>                flags);
>
> You might want ORDERED as a flag.
>
>
> On 12/11/2012 1:07 AM, François Sarradin wrote:
>
>> Hi,
>>
>> Is there a way to get a Stream from an Iterable with the update b67?
>>
>> Should I create a Collection first or is there something shorter?
>>
>> Regards,
>> François Sarradin
>>
>>


More information about the lambda-dev mailing list