LongSummaryStatistics
Class LongSummaryStatistics
- java.lang.Object
-
- java.util.LongSummaryStatistics
- All Implemented Interfaces:
- IntConsumer, LongConsumer
public class LongSummaryStatistics extends Object implements LongConsumer, IntConsumer
A state object for collecting statistics such as count, min, max, sum, and average.
This class is designed to work with (though does not require) streams. For example, you can compute summary statistics on a stream of longs with:
LongSummaryStatistics stats = longStream.collect(LongSummaryStatistics::new,