Java's stream API needs more intermediate operations but instead of implementing some of them, Stream::gather, a new meta-operation, allows the JDK and us to implement all operations we need as Gatherers without overloading the `Stream` interface. Here's how to create Gatherers from an initializer, integrator, finisher, and combiner.
~~ Links ~~
JEP 461: https://openjdk.org/jeps/461
Implementing Gatherers: • Implementing New Java Stream Operations
Code for your experimentation: https://github.com/nipafx/demo-java-x...
VS Code extension: https://marketplace.visualstudio.com/...
Announcement: https://inside.java/2023/10/18/announ...
~~ Chapters ~~
0:00 Intro
1:03 Gatherer - Terminology
1:51 Gatherer - Integrator
2:59 Gatherer - Initializer
5:20 Gatherer - Finisher
7:01 Gatherer - Combiner
7:16 Gatherers
8:07 Oracle VS Code Extension
8:35 Outro
Tags: #Java #OpenJDK #InsideJava
On this page of the site you can watch the video online Better Java Streams with Gatherers - Inside Java Newscast #57 with a duration of hours minute second in good quality, which was uploaded by the user Java 02 November 2023, share the link with friends and acquaintances, this video has already been watched 16,887 times on youtube and it was liked by 711 viewers. Enjoy your viewing!