Design Pattern in Java: Composite