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 Project Explorer view displays enumeration literals under the enumeration for which they are defined. The following table illustrates these two notations.

Enumeration literals in the Project Explorer view Enumeration literals in the diagram editor
Project Explorer hierarchy displaying an enumeration called Boolean. A diagram of an enumeration called Boolean with two public enumeration literals.


Feedback