structural design patterns in java