首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

Java集锦List数据

2012-09-12 
Java汇总List数据list totallogService.retrieve()if (list.size() 0) {totallog new Totallog()i

Java汇总List数据

list = totallogService.retrieve();if (list.size() > 0) {totallog = new Totallog();int handled = 0;int reported = 0;int unassigned = 0;int untreated = 0;for (int i = 0; i < list.size(); i++) {handled += list.get(i).getHandled();reported += list.get(i).getReported();unassigned += list.get(i).getUnassigned();untreated += list.get(i).getUntreated();totallog.setLastTime(list.get(i).getLastTime());}totallog.setHandled(handled);totallog.setReported(reported);totallog.setUnassigned(unassigned);totallog.setUntreated(untreated);list.add(totallog);}

热点排行