The Collectors.collectingAndThen() allows collect the stream elements and add another (finishing) transformation to the result. It is especially useful for creating multi-level groups using Collectors.groupingBy() or Collectors.partitioningBy().
The post Java streams 41. Collect 17. Collectors.collectingAndThen() collector appeared first on Nick Samoylov, programmer and writer.
Published on August 21, 2020 10:41