vendredi 3 août 2018

Decorator Design Pattern use case

As I reviewed lots of examples for "Decorator" design pattern, I just came up with sample which were mainly about changing a method that always return a string, or a method like cost() that aggregates numbers.

is this really the only usage of Decorator design pattern?

Why I can't see a real sample or use case for such design pattern.

All I know it is used for Java IO api.

But I would like to have something else that printing a text. something real. I searched so much, but I could not find a suitable sample.

Aucun commentaire:

Enregistrer un commentaire