Patterns: bridge, composite; java flavour