Gang of Four: sample implementations in Java