[xmlparser]Code-Attribute&AttributeList

package com.xml; /** * @author Administrator * * TODO 要更改此生成的类型注释的模板,请转至 * 窗口 - 首选项 - Java - 代码样式 - 代码模板 */ public class Attribute{ private String name; private String value; public String getName() { return name; } public String getValue() { return value; } public void setName(String name) { this.name = name; } public void setValue(String value) { this.value = value; } public String toString(){ return name+"="+value; } } package com.xml; import java.util.ArrayList; import java.util.List; public class AttributeList { private List list=new ArrayList(4); public AttributeList() { } public void addAttribute(Attribute att){ list.add(att); } public int size(){ return list.size(); } public Attribute getAttribute(int i){ return (Attribute)list.get(i); } public List getAttributeList(){ return list; } }

你可能感兴趣的:(java,String,list,Class,import)