Is there a concise way to extract both the min and max value of a stream (based on some comparator) in one pass?
There appear to be many ways to get the min and max
I think you need that
IntStream myIntStream = IntStream.rangeClosed(1, 100); IntSummaryStatistics intStatistic = myIntStream.summaryStatistics(); System.out.println("Max: " + intStatistic.getMax() + " Min: " + intStatistic.getMin());