IntSummaryStatistics

Class IntSummaryStatistics

All Implemented Interfaces:
IntConsumer
public class IntSummaryStatistics
extends Object
implements 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 ints with:

IntSummaryStatistics stats = intStream.collect(IntSummaryStatistics::new,
                                                IntSummaryStatistics::accept,