Collections for Multivalued Association Ends

A multivalued end is one whose multiplicity's upper bound is greater than 1 (for instance, *). The usual convention is that multivalued ends are thought of as sets. There is no ordering for the target objects, and no object appears in the set more than once. You can change these assumptions, however, by attaching a constraint.

The {ordered} constraint implies that there is an ordering to the target objects—that is, the target objects form a list. Target objects may appear only once in the list.

I use the {bag} constraint to indicate that target objects may appear more than once, but there is no ordering. I also use the {hierarchy} constraint to indicate that the target objects form a hierarchy, and ...

Get UML Distilled: A Brief Guide to the Standard Object Modeling Language, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.