如何在 UML 中使用子集属性? [英] How to use Subsetted Property in UML?
问题描述
子集属性广泛用于 UML 规范图中.
Subsetted Properties are widely used in UML specification diagrams.
- 子集属性的语义(含义)是什么?
- 如何使用 UML 子集属性?
一个真实的例子会很棒
以下来自 UML 规范 2.5(Beta) 的截图
the following screenshot from UML specification 2.5(Beta)
推荐答案
根据 UML 2.4.1 规范,Subsetted Property 引用了该属性被约束为其子集的属性.真实世界的例子是什么意思?我想 UML 规范就是其中之一......但是您可能会在所有应用程序中发现这种属性,其中一个对象与另一个相关联,并且在它们的两个子类型的上下文中重新定义了这种关联.例如,Animal
类可以关联到 Limb
类.我们还可以定义两个类Human
和Leg
,分别扩展Animal
和Limb
.最后,我们可以将 Human
和 Leg
关联起来,这将重新定义先前存在的关联.
According to UML 2.4.1 specification, Subsetted Property references the properties of which this property is constrained to be a subset.
What do you mean by a real-world example ? UML specification is one of them I guess...
But you might find this kind of properties in all applicatioh where an Object is associatded to another and this association is redefined in the context of two of theirs subtypes.
For example, an Animal
class can be associated to a Limb
class. We can also define two classes Human
and Leg
extending respectively Animal
and Limb
. Finally we can associate Human
and Leg
which will be a redefinition of the preexisting association.
希望有帮助,BR
这篇关于如何在 UML 中使用子集属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!