Java design patterns implementations