OCLOperators size
No edit summary
(Updated Edited template to July 12, 2025.)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Returns the number of elements in the collection
<message>Write the content here to display this box</message>
[[Category:OCLOperators]]
=== size () : Integer ===
Returns the number of items in a collection.
{| class="wikitable"
!Expression
!Result
|-
|Set{1,2,4}->size()
|3
|}
[[Category:OCL Collection Operators]]
Not to be confused with [[Documentation:OCLOperators length|length]] that works on [[Documentation:String|strings]]
 
{{Edited|July|12|2025}}

Latest revision as of 05:58, 20 January 2025

This page was created by Alexandra on 2017-08-13. Last edited by Edgar on 2025-01-20.

size () : Integer

Returns the number of items in a collection.

Expression Result
Set{1,2,4}->size() 3

Not to be confused with length that works on strings