list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

W106 Enumeration in Uni-directional Association

Umple semantic warning reported when an enumeration is used in a uni-directional association.

Example

// This example generates the warning

class X {
  enum Y{ Red, Blue, Green }
  0..1 -> * Y;
}

class Y { }
      

Load the above code into UmpleOnline

 

Another Example

// This example generates the warning

class X {
  enum Y{ Red, Blue, Green }
  0..1 <- * Y;
}

class Y { }
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// This example does not generate the warning

class X {
  enum Y { Red, Blue, Green }
  0..1 -> * Z;
}

class Z { }
      

Load the above code into UmpleOnline