UnlimitedNatural

UnlimitedNatural

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 invalid value.

conformsTo Integer

Operations

oclAsType(TT)(type : Metaclass(TT)) : TT

Evaluates to self, where 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 invalid.

The standard behavior is redefined for UnlimitedNatural. Numeric values may be converted to Real or Integer, but the unlimited value may not. Conversion of unlimited to Real or Integer returns invalid.