Assuming that we have a set of categories: categories={A,B}. Let\'s assume more that A consists of subcategories: {A1,A2,A3} and B consists of subcategories: {B1,B2}.In addi
Probably an implementation of this:
public interface Category { String getName(); Category getParent(); List getSiblings(); List getChildren(); List getDescendants(); void addChild(Category category); void addChildren(List categories); }