Teaching Old Streams New Tricks

Have you ever wanted to perform an operation on a java.util.stream.Stream only to find that the existing set of operations didn't provide what you needed—forcing you to break out early from the Stream and perform the logic outside of it?

As a matter of fact, java.util.stream was the first JDK API designed with lambdas in mind and was initially released in JDK 1.8, and ever since then it has allowed Java developers to ergonomically manipulate potentially unbounded streams of data.

While the Streams API offers a rich set of operations out-of-the-box, it was always envisioned to offer the capability for user-defined intermediate operations, yet at that time the right way to expose that hadn't been discovered.

Until now.

In this session we'll demonstrate Gatherers, a potential future API to create and reuse intermediate operations for java.util.stream.Stream, enabling you to perform custom transformations as natural steps in your day-to-day stream processing.

Together, let us teach our old streams some new tricks!

Recorded at Devoxx Belgium 2023