A data type whose instances form a list of named literal values. Usually, both the enumeration name and its literal values are declared.

See also classifier, data type.


An enumeration is a user-definable data type. It has a name and an ordered list of enumeration literal values, each of which is a value in the range of the data type—that is, it is a predefined instance of the data type.

For example, RGBColor = {red, green, blue}, in which the data type is RGBColor and its possible values are red, green, and blue. The data type Boolean is a predefined enumeration with the literals false and true.

Enumeration literals can be compared for equality or for relative position in the list of literals. They are atomic and have no ...

Get Unified Modeling Language Reference Manual, The, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.