Back to project page ExpandableListDemoApp.
The source code is released under:
MIT License
If you think the Android project ExpandableListDemoApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.frost.david.android.model; // ww w . j a v a2 s . c om import java.util.ArrayList; import java.util.List; /** * ExpandableListDemoApp * <p/> * Created by david on 18.11.14. */ public class Category { String name; String[] products; List<SubCategory> list; public Category(String name) { this.name = name; list = new ArrayList<SubCategory>(); } public Category(String name, String[] products) { this(name); this.products = products; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void addSub(SubCategory sub) { list.add(sub); } public SubCategory getSub(int pos) { return list.get(pos); } public boolean hasSub() { return (list.size() > 0); } public List<SubCategory> subs() { return list; } public String[] getProducts() { return products; } }