I am going through Composite design pattern and found that java.util.Map#putAll(Map) is mentioned as example for composite pattern in JDK.I am not able to understand how it follows composite pattern. I have few questions about it as below.
- How putAll(map) is composite pattern?
- How part-whole relationship is defined when using putAll?
Can anyone please help me to understand it.
Aucun commentaire:
Enregistrer un commentaire