Collectors minBy and maxBy

Collectors minBy and maxBy return a Collector that produces the minimal and maximal element according to a given Comparator

August 3, 2020