Enumeration literals

In UML models, enumeration literals are model elements in class diagrams that represent named values in an enumeration.

You can add enumeration literals to an enumeration in your model to represent discrete values for the enumeration. Software applications can copy and store enumeration literals, and pass them as arguments in calls to operations.

Every enumeration literal in an enumeration must have a unique name that describes the value that it represents.

The diagram editor displays enumeration literals in class diagrams in the enumeration shape for which they are defined. The Model Explorer view displays enumeration literals under the enumeration for which they are defined.

Enumeration literals in the Model Explorer view Enumeration literals in the diagram editor
Image shows a portion of the Model Explorer hierarchy that depicts an enumeration called Boolean. The enumeration parent node has two enumeration literals as child nodes: one called true and the other called false. Image shows an enumeration called Boolean in UML notation with the enumeration literals compartment visible.  The enumerations compartment contains two enumeration literals with public visibility: one called true and the other called false.

Parent topic: Class diagrams

Related tasks
Adding enumeration literals to enumerations
Sorting and filtering enumeration literals

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.