uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E004 Invalid Multiplicity

Umple syntactic error reported when an invalid multiplicity is specified

Valid multiplicities in Umple include

  • 0..1 (either zero or one object)
  • 1 (exactly one object)
  • 0..* (any number of objects)
  • * (any number of objects -- a shortcut for 0..*)
  • 1..* (one or more objects)
  • 0..5 (up to 5 objects)
  • 1..5 (between 1 and 5 objects)
  • 2..5 (between 2 and 5 objects)
  • 2..* (at least 2 objects)
  • 5 (exactly 5 objects)
  • Any other similar pattern where other integers appear instead of 2 and 5 in the above.

When this error message appears, the multiplicity doesn't fit any of the above patterns. A common error, for example, is to use the notation 'n', as found in Entity-Relationship Diagrams. This is not valid in Umple; only integers, and * may appear.

Example

// This example generates the error message
class X {
  1 -- 0..1..2 Y;
}

class Y {
}

      

Load the above code into UmpleOnline

 

Another Example

// The following shows how to avoid the error
class X {
  1 -- 0..2 Y;
}

class Y {
}

      

Load the above code into UmpleOnline