composite pattern java