RFR: 8272137: Make Iterable classes streamable

liach github.com+7806504+liach at openjdk.java.net
Sat Aug 14 00:56:21 UTC 2021


On Mon, 9 Aug 2021 12:28:23 GMT, CC007 <github.com+5381337+CC007 at openjdk.org> wrote:

> create Streamable and ParallelStreamable interface and use them in Collection and Optional

Aren't all iterable implementations effectively streamable if they properly implement `spliterator`? And the spliterator implementation can always be sequential or parallel, dependent on how you feed it into `StreamSupport`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5050


More information about the core-libs-dev mailing list