Examples of UML patterns in Java