The standard type UnlimitedNatural is used to encode the non-negative values of a multiplicity specification. This includes a special unlimited value (*) that encodes the upper value of a multiplicity specification. UnlimitedNatural is itself an instance of the metatype UnlimitedNaturalType.
Note that although UnlimitedNatural is a subclass of Integer, the
unlimited value cannot be represented as an Integer.
Any use of the
unlimited value as an integer or real is replaced by the
oclAsType(TT)(type : Metaclass(TT)) : TT
self is of the type identified by T.
The type T may be any classifier defined in the UML model;
if the actual type of
self at evaluation time does not conform to T,
then the oclAsType operation evaluates to
The standard behavior is redefined for UnlimitedNatural. Numeric values may be converted to
Real or Integer, but the
unlimited value may not.
unlimited to Real or Integer returns