Design pattern implementations in Java