Teeing, a Hidden Gem in The Java API
Teeing, a Hidden Gem in The Java API We can replace our custom Collector with two simple Collector implementations, one aggregating price rows and the other summing the carts price. by Last week, I described a use-case for a custom Stream Collector. I received a intriguing comment on Twitter: Hats off to you, Miguel! Your comment revealed a method I didnt know! So I decided to investigate what is the teeing() method about. Returns a Collector that is a composite of two downstream collectors....
Source: dzone.com