中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

EA畫UML圖中Types and Multiplicity有什么用

發布時間:2021-12-20 14:40:23 來源:億速云 閱讀:136 作者:小新 欄目:大數據

這篇文章主要介紹了EA畫UML圖中Types and Multiplicity有什么用,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

7.5.1 Summary(概要)


Types and multiplicity are used in the declaration of Elements that contain values, in order to constrain the kind and number of values that may be contained.

類型和多重度用于包含值的元素的聲明中,目的是限制可以包含的值的數量和類型。

7.5.2 Abstract Syntax(抽象語法)

EA畫UML圖中Types and Multiplicity有什么用

Figure 7.10 Abstract syntax of types and multiplicity elements

7.5.3 Semantics(語義)

7.5.3.1 Types and Typed Elements(類型和類型化元素)

A Type specifies a set of allowed values known as the instances of the Type. Depending on the kind of Type, instances of the Type may be created or destroyed over time. However, the rules for what constitutes an instance of the Type remain fixed by the definition of that Type. All Types in UML are Classifiers (see Clause 9).

類型定義了被稱為類型的實例的允許值的集合。根據類型的種類,類型的實例可以被創建或者一段時間以后被銷毀。然而,決定由什么來構成類型的實例的規則仍然會被類型的定義修正。UML中的所有的類型都是類目。

A TypedElement is a NamedElement that, in some way, represents particular values. Depending on the kind of TypedElement, the actual values that it represents may change over time. Examples of kinds of TypedElement include
ValueSpecification, which directly specifies a collection of values (see Clause 8), and StructuralFeature, which represents values held as part of the structure of the instances of the Classifier that owns it (see sub clause 9.4).

一個類型化元素在某種情況下是一個命名元素,代表特殊值。根據類型化元素的種類,它所表現的實際值會隨著時間而改變。類型化元素的例子包括值定義,它直接定義值的聚集,還有結構化功能,可以表現一些值,這些值作為擁有它的類目的實例的結構的一部分來保持。

If a TypedElement has an associated Type, then any value represented by the TypedElement (at any point in time) shall be an instance of the given Type. A TypeElement with no associated Type may represent any value.

如果一個類型化元素有一個關聯類型,那么被這個類型化元素表達的任何值都給應該是給定類型的實例。沒有關聯類型的類型化元素可能表現任何值。

7.5.3.2 Multiplicities(多重度)

A MultiplicityElement is an Element that may be instantiated in some way to represent a collection of values.Depending on the kind of MultiplicityElement, the values in the collection may change over time. Examples of kinds of
MultiplicityElement include StructuralFeature, which has values in the context of an instance of the Classifier that owns it (see sub clause 9.4) and Variable, which has values in the context of the execution of an Activity (see sub clause 15.2).


多重元素可以被以某種方式實例化,以表現值的聚合。根據多重元素的種類,聚合中的值會隨著時間發生改變。多重元素的例子有結構化功能,它保持擁有它的類目的實例的上下文中的值;還有變量,它保持一個活動的執行的上下文中的值。


The cardinality of a collection is the number of values contained in that collection. The multiplicity of a MultiplicityElement specifies valid cardinalities of the collection it represents. The multiplicity is a constraint on the cardinality, which shall not be less than the lower bound and not greater than the upper bound specified for the multiplicity (unless the multiplicity is unlimited, in which case there is no constraint on the upper bound).


聚合的基數是在聚合中包含的值的數量。多重元素的多重度定義了它所表現的聚合的有效基數。多重度是基數的約束,基數不應該少于多重度的下限也不應該超過多重度的上限(除非多重度是無限,這種情況的含義是沒有上限)

The lower and upper bounds for the multiplicity of a MultiplicityElement are specified by ValueSpecifications (see Clause 8), which must evaluate to an Integer value for the lowerBound and an UnlimitedNatural value for the upperBound (see Clause 21 on Primitive Types). A MultiplicityElement is unlimited if its upperBound has the UnlimitedNatural value of unlimited (“*”). A MultiplicityElement is multivalued if it has an upperBound greater than 1 (including unbounded). A MultiplicityElement that is not multivalued can represent at most a single value.


多重元素的多重度的上下限是由值定義(ValueSpecificaiton)來定義的。它運算后可以得到整數類型的下限值和一個無限自然數類型的上限值。如果上限被指定為無限自然數類型的無限(“*”),那么多重元素就是無限的。如果多重元素的上限大于1(包含上限),那么它就是多值的,非多值的多重元素只能表現至多一個單值。


A MultiplicityElement can define a multiplicity both of whose bounds are zero. This restricts the allowed cardinality to be 0; that is, it requires that an instantiation of this element contain no values. This is useful in the context of Generalizations (see sub clause 9.2) to constrain the cardinalities of a more general Classifier. It applies to (but is not limited to) redefining properties existing in more general Classifiers.

多重元素可以將多重度的界限值都定義為0。這要求可能的基數為0。也就是說,請求的是一個該元素的不包含值的實例。這種做法在泛化場景中可以用于約束更加一般(上級)的類目的基數。它申請(但不是限制)在更加一般的類目中存在重新定義的屬性。


If the MultiplicityElement is specified as ordered (i.e., isOrdered is true), then the collection of values in an instantiation of this Element is ordered. This ordering implies that there is a mapping from positive integers to the elements of the collection of values. If a MultiplicityElement is not multivalued, then the value for isOrdered has no semantic effect.

如果多重元素被定義為有序的(即isOrdered為真),則以為該元素中的值的聚合就是有序的。這里的順序意味著存在一個從正整數到值聚合元素的映射。如果多重元素不是多值的,那么isOrdered的值沒有語義上的效果。

If the MultiplicityElement is specified as unordered (i.e., isOrdered is false), then no assumptions can be made about the order of the values in an instantiation of this Element.


如果多重元素被定義為無序的(即isOrdered為假),那么就不能對包含在元素實例中值的順序進行任何的假設。


If the MultiplicityElement is specified as unique (i.e., isUnique is true), then the collection of values in an instantiation of this Element must be unique. That is, no two values in the collection may be equal, where equality of objects (instances of Classes) is based on object identity while equality of data values (instances of DataTypes) and Signal instances is based on value (see also sub clauses 10.2, 10.3, and 11.4 on DataTypes, Signals and Classes, respectively ). If a MultiplicityElement is not multivalued, then the value for isUnique has no semantic effect.

如果多重元素被指定了唯一性(即isUnique為真),那么元素實例中值的聚合必須是滿足唯一性的。就是說在聚合中沒有兩個值相等,這里的相等對于對象來說是根據對象同一性來判斷的,而對于數據值和信號實例就是根據數值來判斷的。如果多重元素不是多值的,那么isUnique屬性的值不具有語義上的效果。

Taken together, the isOrdered and isUnique properties can be used to specify that the collection of values in an instantiation of a MultiplicityElement is of one of four types. Table 7.1 shows the traditional names given to each of these collection types.

總的來說,isOrdered和isUnique屬性可以用來決定多重元素的實例的值聚合屬于四種類型中的哪一種。表格7.1表示了這四種聚合類型傳統的名稱。

Table 7.1 Collection types for MultiplicityElements

EA畫UML圖中Types and Multiplicity有什么用

感謝你能夠認真閱讀完這篇文章,希望小編分享的“EA畫UML圖中Types and Multiplicity有什么用”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

安仁县| 屯留县| 名山县| 阜阳市| 全南县| 绍兴县| 静宁县| 渭源县| 工布江达县| 鹰潭市| 大埔区| 昆山市| 田东县| 桦甸市| 金乡县| 密云县| 定远县| 晋江市| 原阳县| 庐江县| 望奎县| 安阳县| 芦山县| 洪湖市| 奉贤区| 巴马| 元谋县| 普格县| 三亚市| 江口县| 仁化县| 财经| 阳山县| 凌海市| 碌曲县| 景德镇市| 射阳县| 彭山县| 辽源市| 茂名市| 连南|