Set<Items> keys = goods.keySet(); 什么意思
public double calToCartPrice(){
double sum = 0.0;
Set<Items> keys = goods.keySet();
Iterator<Items> it = keys.iterator();
while(it.hasNext())
{
Items i = it.next();
sum+= i.getPrice()*goods.get(i);
}
this.setTotalPrice(sum);//设置购物车总金额
return this.getTotalPrice();
}