How to describe a contained map in UML class diagram?
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 diagram but I can't figure out a clean way to do that. Kru You can use a qualified association: ┌──────────┐ 1 ┌───────┐ │ MyServer │Key│───────────│ Value │ └──────────┘ └───────┘ See: http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Qualified+Associations/ (cause it is hard to draw using ASCII) Note also that a qualified association changes the multiplicity: ┌──────────┐ 0..* ┌───────┐ │