Design patterns written in Java