Integer

Integer

The standard type Integer represents the mathematical concept of integer. Note that UnlimitedNatural is a subclass of Integer, so for each parameter of type Integer, you can use an unlimited natural as the actual parameter. Integer is itself an instance of the metatype PrimitiveType (from UML).

conformsTo Real

Operations

-() : Integer precedence: UNARY

The negative value of self.

+(i : OclSelf) : Integer precedence: ADDITIVE

The value of the addition of self and i.

-(i : OclSelf) : Integer precedence: ADDITIVE

The value of the subtraction of i from self.

*(i : OclSelf) : Integer precedence: MULTIPLICATIVE

The value of the multiplication of self and i.

/(i : OclSelf) : Real precedence: MULTIPLICATIVE

The value of self divided by i. Evaluates to invalid if r is equal to zero.

abs() : Integer

The absolute value of self.

compareTo(that : OclSelf) : Integer

The comparison of self with that. -ve if less than, 0 if equal, +ve if greater than.

div(i : Integer) : Integer

The number of times that i fits completely within self.

mod(i : Integer) : Integer

The result is self modulo i.

max(i : OclSelf) : Integer

The maximum of self an i.

min(i : OclSelf) : Integer

The minimum of self an i.

toString() : String

Converts self to a string value.