Previous UML Classes Table of Contents UML Packages Next


7.3.16 Enumeration

Kernel


   An enumeration is a data type whose values are enumerated in the model as enumeration literals.

*Generalizations

   

    DataType (from Kernel ) on page 60

*Description

   Enumeration is a kind of data type, whose instances may be any of a number of user-defined enumeration literals. It is possible to extend the set of applicable enumeration literals in other packages or profiles.

*Attributes

   No additional attributes

*Associations

ownedLiteral: EnumerationLiteral [*] The ordered set of literals for this Enumeration. Subsets
Element::ownedMember

*Constraints

   No additional constraints

*Semantics

   The run-time instances of an Enumeration are data values. Each such value corresponds to exactly one EnumerationLiteral .

*Notation

   An enumeration may be shown using the classifier notation (a rectangle) with the keyword «enumeration». The name of the enumeration is placed in the upper compartment. A compartment listing the attributes for the enumeration is placed below the name compartment. A compartment listing the operations for the enumeration is placed below the attribute compartment. A list of enumeration literals may be placed, one to a line, in the bottom compartment. The attributes and operations compartments may be suppressed, and typically are suppressed if they would be empty.

   Examples

Figure 7.41 - Example of an enumeration

«enumeration» VisibilityKind

public private protected


   package