Skip to content

Instantly share code, notes, and snippets.

@kevindoran
Created February 1, 2013 04:06
Show Gist options
  • Select an option

  • Save kevindoran/4689116 to your computer and use it in GitHub Desktop.

Select an option

Save kevindoran/4689116 to your computer and use it in GitHub Desktop.
Category class for dynamic menu
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