dimanche 9 avril 2017

Composite design pattern with java.util.Map#putAll(Map)

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.

  1. How putAll(map) is composite pattern?
  2. How part-whole relationship is defined when using putAll?

Can anyone please help me to understand it.

Aucun commentaire:

Enregistrer un commentaire