Data types
A data type is similar to a class; however, instances of data type are identified only by their value. If two data types have the same value, the instances are considered identical.
A data type can contain attributes, but only to support the modeling of
structured data types. Instances of structured data types are considered the
same if the following conditions are true:
- The structure of the data types are identical
- The values of the corresponding attributes are identical
By default, when you create a new data type, the compartments for attributes and operations are hidden.
As the following figure illustrates, a data type artifact is displayed as a rectangle that contains the name of the data type. The rectangle also contains the stereotype «data type» and the data type icon.
