list of dots

User Manual    [Previous]   [Next]   

MultiValued Attributes

As in UML, Umple allows one to specify an attribute with multiple values.

We encourage the use of association notation in this context, however the attribute notation can be useful sometimes.

Initialization of multivalued attributes is also allowed, as shown in the example.

Example

class Office {
   Integer number;
   Phone[] installedTelephones;
   String[] emails = {"abc@umple.org", "def@umple.org"};
   Integer [] incomingNumbers = {765432, 987654};
} 

class Phone {
  String digits;
  String callerID;
}
      

Load the above code into UmpleOnline

 

Syntax


complexAttribute- : [=unique]? [=lazy]? [=ivar]? [=modifier:immutable
    |settable
    |internal
    |defaulted
    |const
    |fixml]? [[typedName]] (= [**value])? ;