Convert Interval<Integer> to MULTIPLICITY_INTERVAL to simplify specification and implementation.


Currently, there are three places in the AOM where Interval<Integer> is used:

  • C_ATTRIBUTE.existence

  • C_MULTIPLE_ATTRIBUTE.cardinality.interval

  • C_OBJECT.occurrences

It is proposed to replace this with a class MULTIPLICITY_INTERVAL, which is formally defined as inheriting from Interval<Integer>. It has the same data members, but provides a place to define useful functions such as :

  • is_open: Boolean

  • is_optional: Boolean

  • as_string: String – output in typical UML format, e.g. "0..1"

as well as various constructors that make sense for multiplicity intervals. It also ensures the lower_limit cannot be less than 0.

The other advantage is for formalisms like XML, the class MULTIPLICITY_INTERVAL can replace the pseudo type IntervalOfInteger in the BaseTypes.xsd (


(Sam Heard) inactive
June 26, 2009, 12:45 AM

We do not need the includes upper and lower as this is the norm - can we remove these too.


Thomas Beale

Raised By

Thomas Beale


Affects versions