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
Kru's answer is the best, but it still only hints at a Map.
I would argue it depends on the level of abstraction at which your diagram sits. If it's relatively high, I'd go with chimp's response. If it's relatively low and you really need to show a map, intentionally showing implementation-related detail, I'd go with the following:
MyServer
|
|
Map
|
|*
T1toT2
/ \
1/ \1
Key Value
How the map is then implemented in code is totally irrelevant (T1toT2 run-time objects might not actually come to be).
As mentioned by Gabreil, this could be also be modelled using an association class
MyServer
|
|
Map
|
|*
T1toT2
|
|
1--------1
Key Value
Of course is only matters if you really really need to show or specify a map.