Stream constructors for stream(Iterator) in StreamSupport?
Tim Peierls
tim at peierls.net
Sat Apr 13 09:06:40 PDT 2013
Doesn't that seem like something that belongs in Streams? If you're stuck
with a legacy API that exposes Iterator but not Iterable, you'd still want
to be able to make a Stream out of it, and you wouldn't want to have to
look in StreamSupport for that. It's a lot different from
stream(Spliterator).
On Sat, Apr 13, 2013 at 11:24 AM, Brian Goetz <brian.goetz at oracle.com>wrote:
> Currently StreamSupport contains seq/par versions of
> stream(Spliterator)
> stream(Supplier<Spliterator>)
> for ref/int/long/double.
>
> In java.util.Spliterators, there are adapters to turn an Iterator into a
> Spliterator.
>
> I think we should add convenience factories for
>
> stream(Iterator)
>
> to StreamSupport as well.
>
More information about the lambda-libs-spec-observers
mailing list