Proxy pattern, State pattern, Template Delegation, and Visitor Pattern examples in Java