the semantic of Data Type in UML

坚强是说给别人听的谎言 提交于 2020-02-02 13:36:16

问题


data Type is a descriptor of a set of values that lack identity

What does mean by Lack of identity here?


回答1:


Referring to the UML DataType description on IBM's Help Center:

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.

So this means, that you can't seperate these objects of this DataType by their identifier, because they don't have any. Only the current value is used to compare instances. Like int-instances in Java for example.

I hope I could help...




回答2:


In UML data types are model elements that define data values. A data type can be anything from value types in business domain to primitive types or structured types of a programming language. e.g- date/time, gender,integer, currency, address. As noted in another answer it is similar to a class,whose instances are identified only by their value.

Now, coming to your question, the Lack of Identity here means any data value which has not been described of its type yet. Its qualification is unknown in the problem whether its any currency or integer or date or anything.

An example of a datatype:

By default, when you create a new data type, the compartments for attributes and operations are hidden.



来源:https://stackoverflow.com/questions/17359144/the-semantic-of-data-type-in-uml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!