Java streams 40. Collect 16. Collectors.toUnmodifiableList/Set/Map() collectors

The Collectors.toUnmodifiableList/Set/Map() collectors create corresponding unmodifiable (elements cannot be added o removed) structure. That is why such a collector especially useful for creating multi-level groups using Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 40. Collect 16. Collectors.toUnmodifiableList/Set/Map() collectors appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 17, 2020 15:41
No comments have been added yet.