赞
踩
老规矩直接上代码吧 //actList是源列表,aList是最终的列表 List<RuntimeActivityInfo> aList = new ArrayList<RuntimeActivityInfo>(); for (int i=0;i<actList.size();i++) { String nodeId = actList.get(i).getNodeId(); boolean b = true; for(RuntimeActivityInfo anfo : aList){ if(nodeId.equalsIgnoreCase(anfo.getNodeId())){ anfo = actList.get(i); b=false; break; } } if(b==true){ aList.add(actList.get(i)); } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。