[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.mdt.uml2] Re: modeling arrays in uml
|
- From: Rafael Chaves <rafael@xxxxxxxxxxxx>
- Date: Thu, 02 Jul 2009 09:18:43 -0700
- Newsgroups: eclipse.modeling.mdt.uml2
- Organization: Abstratt Technologies - http://abstratt.com
- User-agent: Thunderbird 2.0.0.22 (Windows/20090605)
You can use multiplicities for this:
class A
attribute age : int[0..*] {ordered};
end;
That means age's multiplicity will be ordered and will allow multiple
elements.
I wrote about this in the past:
http://abstratt.com/blog/2007/11/17/uml-101-with-textuml-multiplicity-or/
just ignore the fact that that post uses the TextUML notation.
I don't have a suggestion for the 'arrays of arrays' case other than
creating a new abstraction for it.
Cheers,
Rafael
Usul wrote:
hi,
lets say I want to model that class:
class A
{
int[] age;
}
How do i do this? Is there a special element for arrays? Or is "age"
just typed integer and the upper-property is set to "*" ?
And what about multidimensional array like int[][] ?
Thanks for any help