In UML models, enumerations are
model elements that represent user-defined data types. Enumerations
contain sets of named identifiers, called enumeration literals, that
represent the values of the enumeration. Enumerations can represent
primitive types, such as integer and Boolean types, or user-defined
types.
Before you begin
Before you can add enumerations to a profile, the profile
must be open in the Project Explorer view.
Procedure
- In the Project Explorer view, right-click
a profile; then click .
- Type a name and press Enter.
- In the Project Explorer view, right-click
an enumeration; then click .
- Type a name for the enumeration literal and press Enter.
Example
In a profile, you can specify an enumeration as the type
for an attribute. For example, you can specify an enumeration called
Days and
an enumeration literal for each day of the week. You can then create
an attribute called
MyFavoriteDay of type Days
and specify the enumeration literal called Saturday as the default
value for the attribute.