Created
February 1, 2013 04:06
-
-
Save kevindoran/4689116 to your computer and use it in GitHub Desktop.
Category class for dynamic menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Category { | |
| private String name; | |
| public Category() { | |
| name = "" + Math.random(); | |
| } | |
| public List<Category> getChildCategories() { | |
| List<Category> childCategories = new ArrayList<>(); | |
| for(int i=0; i<20; i++) { | |
| childCategories.add(new Category()); | |
| } | |
| return childCategories; | |
| } | |
| @Override | |
| public String toString() { | |
| return name; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment