How can I represent a Python dictionary in UML?
1 answer
Qualified associations are useful for modeling maps / dictionaries.
See uml-diagrams.org for some examples .
You can also read the official UML (2.5) specs (see page 215)
And your specific problem can be represented as:
Note, however, that this is only for nodes with single outgoing edges (its one-to-one mapping); if that wasn't your intention as the mapping would have to be Node to Edges array. (and changing 1
to *
).
+1
source to share