Set and Bag types [message #759285] |
Mon, 28 November 2011 09:27 |
Eclipse User |
|
|
|
Hi all, maybe a silly question, but still.. is there Set (Bag) type in
UML2? And if yes, how attribute of that type is described? Thanks in
advance.
|
|
|
|
Re: Set and Bag types [message #759305 is a reply to message #759294] |
Mon, 28 November 2011 10:33 |
Eclipse User |
|
|
|
So, multiplicity of the attribute defines that, understood.
What i didn't know, that attributes can have multiplicity (thought
multiplicity is only related to the class as whole)
If we have
org.eclipse.uml2.uml.Class theClass;
org.eclipse.uml2.uml.Property prop = theClass.getAllAttributes().get(0);
And prop.getLower() (prop.getUpper()) will then contain multiplicity for
that attribute? How is that depicted in the class diagramm?
On 28.11.2011 10:51, Ed Willink wrote:
> Hi Emil
>
> Not entirely silly; it is a mismatch between OCL and UML that awaits
> resolution.
>
> In UML, collection kinds are deduced from the ordered/unique
> multiplicity properties, so a Bag is configired by a MultiplicityElement
> with upperBound > 1, !unique, !ordered.
>
> Regards
>
> Ed Willink
>
> On 28/11/2011 09:27, Emil Huseynli wrote:
>> Hi all, maybe a silly question, but still.. is there Set (Bag) type in
>> UML2? And if yes, how attribute of that type is described? Thanks in
>> advance.
>
|
|
|
|
Re: Set and Bag types [message #759612 is a reply to message #759470] |
Tue, 29 November 2011 10:47 |
Eclipse User |
|
|
|
Ok, thanks a lot
On 28.11.2011 19:57, Ed Willink wrote:
> Hi
>
>> And prop.getLower() (prop.getUpper()) will then contain multiplicity
>> for that attribute? How is that depicted in the class diagramm?
> It depends on your diagram tool and viewing filters, but many display
> things such as ?,*,+,1..3
>
> Regards
>
> Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.02050 seconds