.toInteger()

Description of the method

Description: toInteger() converts the string into an integer value
Available for: string
Parameters:  -
Return type: integer

Example

Context: TransactionType1
OCL: self.Id.toInteger() = 11 + 11
Description: This rule attempts to convert Id into integer, and then compares it's value to the result of the arithmetic sum of the right side of expression 

 

The XML snippet below would pass this check.

<Id>22</Id>

The other snippet below however would not pass this check.

<Id>23</Id>

<Id>AA</Id>