Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
PerfectJPattern's offers a componentized version of the Decorator pattern. In order to implement
decorators and take advantage of PerfectJPattern's implementation, users are required to extend
AbstractDecorator.
Implementing decorators using PerfectJPattern's AbstractDecorator
offers the following
advantages:
equals
is automatically handled to match that of the Component,
thus to the outside world the Decorator still is the Component assuming equals
defines
identity