-
Key: UMLR-228
-
Legacy Issue Number: 15248
-
Status: open
-
Source: Change Vision ( Michael Chonoles)
-
Summary:
Is there a standard UML way of initializing complex fields. Several examples below
A: Integer (3,2) = (1,2,3,4,5,6)
A: Integer (3,2) = ((1,2,3), (4,5,6))
A: Integer (3,2) = ((1,2), (3,4), (5,6))
And are they all the same?
A: Integer (2,3) = (1,2,3,4,5,6)
A: Integer (2,3) = ((1,2,3), (4,5,6))
A: Integer (2,3) = ((1,2), (3,4), (5,6))
And are these the same?
And what’s the difference.
And here another set
Measurement (a Type)
Value: Real
Unit : String
Experiment:Measurement(3) = (1.0, “ft”, 2.0,”ft”,3,”ft”)
= ((1.0,”ft”), (2.0,”ft”), (3,”ft”))
Experiment:Measurement(3,2)) = (1.0, “ft”, 2.0,”ft”,3,”ft”, 4,”ft”, 5,”ft”,6,”ft”)
((1.0,”ft”), (2.0,”ft”), (3,”ft”), (4,”ft”), (5,”ft”), (6,”ft”))
(((1.0,”ft”), (2.0,”ft”), (3,”ft”)), ((4.0,”ft”), (5.0,”ft”), (6,”ft”)))
My preferences are for the last one above (the one with the extra set of parenthesis), because is better support composition
e.g.
NullResults:Measurement = (0.0,”ft”)
StartingResults:Measurement(3) = (NullResults, NullResults, NullResults)
Experiment:Measurement(3,2) = (StartingResults, ((4.0,”ft”),(5.0,”ft”),(6.0,”ft”)))
The UML spec is silent about the correct way of doing this. I’d like to have a language independent way of doing this.
-
Reported: UML 2.5 — Tue, 6 Apr 2010 04:00 GMT
-
Updated: Fri, 6 Mar 2015 20:57 GMT