//summaryStatistics 를 이용한 통계방식 적용.
DoubleSummaryStatistics tpStat = list.stream().mapToDouble( log -> log.getTemp()).summaryStatistics();

 

이렇게 하면 다음과 같은 값들을 한번에 구할 수 있다. 사용법은 tpStat.getCount(), getSum() 등등

private long count;
private double sum;
private double min;
private double max;

Posted by yongary
,