How to describe a contained map in UML class diagram?

前端 未结 6 1781
迷失自我
迷失自我 2020-12-01 16:10

I have a MyServer class that contains a Map whose keys are MyClientType objects and whose values are MyClient objects. I\'d like to depict this relationship in a class diagr

6条回答
  •  自闭症患者
    2020-12-01 16:30

                 MyServer
                     |
                     |
                     |
                    Map
                     |
                    | |
                   |   |
      MyClientTypeKey   MyClientType
    

    Should it not be quite simple like above?

    • MyServer has a one to one assoication with the Map
    • The Map has 1 to many associations with both the keys and values.

提交回复
热议问题