Unified Modeling Language Reference Manual, The, Second Edition
by James Rumbaugh, Ivar Jacobson, Grady Booch
enumeration
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.
Semantics
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access