Enumeration defines a kind of data type whose range is a list of predefined values called Enumeration Literals. An Enumeration can contain Operations, but they must be pure functions (this is the rule for all data type elements).

An Enumeration can be specified by changing its property values in the Enumeration Specification window. Each property is described in the description area on this window.

Enumeration Literals

Enumeration Literal defines an element of the run-time extension of an Enumeration data type. It has no relevant substructure, therefore, it is atomic.

 

To create an Enumeration Literal, do one of the following


  • Select the Enumeration shape, click the Create Element button , and then select Enumeration Literal.

  • In the Containment tree, right-click the Enumeration and select Create Element > Enumeration Literal.

Enumeration Attributes

To create an Attribute for the Enumeration, do one of the following


  • Select the Enumeration shape, click the Create Element button , and then select Property.

  • In the Containment tree, right-click the Enumeration and select Create Element > Property.

As you can see, the Attribute is by default read-only.