What Makes The Teeing Method In The Java API So Cool

Written by nfrankel | Published 2021/05/20
Tech Story Tags: java | api | stream | backend | learn-java-8 | beginners | teeing | java-8

TLDR Last week, I described a use-case for a custom Stream-type collector. I received a intriguing comment on Twitter that revealed a method I didn’t know. I decided to investigate what is the                teeeing() method about. The method is a composite of two downstream collectors. Every element passed to the resulting collector is processed by both downstream collectors, then their results are merged using the specified merge function into the final result. The complete source code for this post can be found on Github in Maven format.via the TL;DR App

no story

Written by nfrankel | Dev Advocate | Developer & architect | Love learning and passing on what I learned!
Published by HackerNoon on 2021/05/20