Как суммировать баллы клиентов по лямбда-потоку sum()
?
public class CustomerDetail {
private int point = 1;
private Integer id;
public CustomerDetail() {
this(0);
}
public CustomerDetail(int id) {
this.id = id;
}
public void setPoint(int point) {
this.point = point;
}
public int getPoint() {
return point;
}
}
HashMap<String, List<CustomerDetail>> list = new HashMap<String, List<CustomerDetail>>()