Decorator design pattern in Java