lundi 13 septembre 2021

In flyweight pattern, Why does UnsharedConcreteFlyweight have "allSate"?

Here is the structure diagram of flyweight pattern.

enter image description here

I already know UnsharedConcreteFlyweight is a space for extrinsicState. But according to this UML, it has allSate including intrinsicState and book "GoF" tell me UnsharedConcreteFlywight often have ConcreteFlyweight as a child. So I wonder when UnsharedConcreteFlyweight have intrinsicState and ConcreteFlyweight as a child and I want to know the simple example.

Aucun commentaire:

Enregistrer un commentaire