java的Enumeration转list
java的Enumeration转list
Enumeration<String> attrs = getAttrNames();
// while(attrs.hasMoreElements()){
// String attrName = (String)attrs.nextElement();//调用nextElement方法获得元素
// dataMap.put(attrName, getAttr(attrName));
// }
ArrayList<String> a = Collections.list(attrs);
a.remove("i18nMap");//去除i18nMap
for(String attrName : a){
dataMap.put(attrName, getAttr(attrName));
}
不积跬步无以至千里,不积小流无以成江海