Proposal: JDK-8148917 Enhanced-For Statement Should Allow Streams
Stephen Colebourne
scolebourne at joda.org
Thu Mar 14 23:16:47 UTC 2019
On Thu, 14 Mar 2019 at 19:45, Brian Goetz <brian.goetz at oracle.com> wrote:
> Why not make `Iterator` implement `IterableOnce`? The default method
> would obviously just return `this`.
>
> Such a default would not conform to the contract, as IO requires that subsequent calls throw.
IterableOnce.wrap(iterator) ?
Not providing some kind of connection between these types will look
pretty silly I think.
Stephen
More information about the core-libs-dev
mailing list