List<Pool> list = new ArrayList<Pool>(){ {
add(new Pool("A", 1));
add(new Pool("A", 2)); add(new Pool("A", 3)); add(new Pool("B", 4));
add(new Pool("B", 5)); } };
//求和 int sum = list.stream().mapToInt(Pool::getValue).sum();
// 最大值 OptionalInt max = list.stream().mapToInt(Pool::getValue).max();
// 最小值 OptionalInt min = list.stream().mapToInt(Pool::getValue).min();
// 平均值 OptionalDouble average = list.stream().mapToInt(Pool::getValue).average();
//对long值处理
list.stream().mapToLong(Pool::getValue).sum();
list.stream().mapToLong(Pool::getValue).max();
list.stream().mapToLong(Pool::getValue).min();
list.stream().mapToLong(Pool::getValue).average();
//对double处理
list.stream().mapToDouble(Pool::getValue).sum();
list.stream().mapToDouble(Pool::getValue).max();
list.stream().mapToDouble(Pool::getValue).min();
list.