The Decorator pattern allows you to add and modify behavior using composition rather than inheritance. The key advantages of Decorator patterns are that you can add and change behavior at runtime, and you can potentially chain together behaviors without having to write new subclasses for each permutation. |