Looking at the Decorator pattern page on wikipedia (http://ift.tt/RlBwsS), the layout looks something like this:
- Component interface
- Component implementation
- Decorator interface that implements the component interface
- Decorator(s) that implement the decorator interface
Can decorators instead directly implement the component interface (and skip on the decorator interface)?
Aucun commentaire:
Enregistrer un commentaire