Everything about

#streams

I really enjoy using Java's Stream API - even more than that, I like to play around with it, trying out as many things as I can come up with.

Broken Stream::group with Java 16's mapMulti#post#java‑16 #streams
Java 16 adds a new method mapMulti to Stream and it can be abused to simulate a reverse-flatMap aka group operation (with shortcomings).
Faster flatMaps with Stream::mapMulti in Java 16#post#java‑16 #streams #performance
Java 16 adds a new method mapMulti to Stream. It fills the same role as flatMap, but is more imperative - and faster.
Teeing Collector in Java 12#post#java‑12 #streams
The teeing collector, available since Java 12 as Collectors::teeing, forwards its input to two other collectors before merging their results with a function.
Code-First Java 9 Tutorial#post#java‑9 #migration #streams #optional #collections #j_ms
Showing code for the most important Java 9 features: private interface methods, stream and optional APIs, collection factories, reactive streams, stack walking, multi-release JARs, redirected platform logging, unified logging, the module system, and more. If you're new to Java 9, start here.
Repackaging Exceptions In Streams#post#clean‑code #java‑8 #lambda #streams
How to repackage checked exceptions that get thrown in a Java stream pipeline so that they can be thrown without the compiler complaining about it.
Expert Java 8#talk#java‑8 #lambda #streams #optional #default‑methods
With this talk, I help you get the most out of lambdas, Streams, Optionals, and default methods, helping you master Java 8's core features
Rebutting 5 Common Stream Tropes#post#java‑8 #rant #streams
Articles about Java 8's streams often repeat a bunch of tropes: succinctness, ugly mechanics, anemic pipelines, weak exception handling. This is a rebuttal!
Oh No, I Forgot Stream::iterate!#post#java‑9 #streams
In Java 9 Stream gets a couple of new methods - one of them is an overload of iterate that takes a predicate and returns a finite stream.
Java 9 Additions To Stream#post#java‑9 #streams
Java 9 is coming! One of the many changes are new Stream methods: takeWhile, dropWhile, and ofNullable. For more fun with streams!
Beware Of findFirst() And findAny()#post#java‑8 #streams
Stream.findFirst() and findAny() work with any number of elements in the stream. Make sure to reduce(toOnlyElement()) if there should be at most one.
Stream Performance - Your Ideas#post#java‑8 #performance #streams
Another post about stream performance - this one implements your ideas about how else to approach the topic.
Stream Performance#post#java‑8 #performance #streams
A close look at stream performance. How do they compare to for and for-each loops oder arrays and lists. And what role plays boxing?
Casting In Java 8 (And Beyond?)#post#java‑8 #optional #streams
Proposal to implement new casting methods on Java's Class. They aim to fulfill the need for improved ways to cast which was created by Java 8.