uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

W010 Singleton Multiplicity Over 1

Umple semantic warning reported when a singleton class has an association with incoming multiplicity > 1

Since there can only be one instance of a singleton class, it is logically impossible for another class to have links to more than one instance of the singleton class.

Example

// This example generates the warning message
class X {
  singleton;
}

class Y {
   0..1 -- * X;
}

      

Load the above code into UmpleOnline

 

Another Example

// The following shows how to avoid the warning
class X {
  singleton;
}

class Y {
   0..1 -- 1 X;
}

      

Load the above code into UmpleOnline