streams

Using java.util.stream.Collector Programming

Using java.util.stream.Collector

Search for this lovely gem that came in Java 8, and you will find plenty of articles on how to create your own Collector, and calling Streams.collect() with a collector to gather the data into a collection. Neither of these was the problem I …