map遍历

Map<OrderType , Long> m = ReportFactory.getOrderSta(lst.getUserid());
 for (Iterator iterator = m.entrySet().iterator(); iterator.hasNext();) {
  Map.Entry<OrderType, Long> entry = (Map.Entry<OrderType, Long>) iterator.next();
  request.setAttribute(entry.getKey().name(), entry.getValue());
 }

你可能感兴趣的:(map)