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

User Manual    [Previous]   [Next]   

E004 Invalid Multiplicity

Umple syntactic error reported when an invalid multiplicity is specified

Valid multiplicities in Umple include the following, where n and m are positive integers and where n <= m:

  • 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..m (up to m objects)
  • 1..m (between 1 and m objects)
  • n..m (between n and m objects)
  • n..* (at least n objects)
  • m (exactly m objects)

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, instead of *. 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

 

Solution to The Above So the Message No Longer Appears

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

class Y {
}
      

Load the above code into UmpleOnline