Better Java Streams with Gatherers - Inside Java Newscast #57

Java’s stream API needs more intermediate operations but instead of implementing some of them, Stream::gather, a new meta-operation proposed by JEP 461, 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.