Tutorial: The Gatherer API


Starting with the JDK 24 you can use a specific API to model your intermediate operations in the Stream API, called the Gatherers API. Design-wise it is similar to the Collector API for terminal Stream operations.

More at https://dev.java/learn/api/streams/gatherers/