OCLOperators count
No edit summary
(Updated Edited template to July 12, 2025.)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
=== count ( object : T ) : Integer ===
=== count ( object : T ) : Integer ===
Returns how many times ''object'' is in the collection ''self''.  
Returns how many times ''object'' is in the collection ''self''.  
Line 17: Line 18:
|2
|2
|}
|}
[[Category:OCLOperators]]
[[Category:OCL Collection Operators]]
[[Category:OCL Collection Operators]]
[[Category:OCL General Operators]]
{{Edited|July|12|2025}}

Latest revision as of 05:57, 20 January 2025

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

count ( object : T ) : Integer

Returns how many times object is in the collection self.

Expression Result
Sequence{2.3, 5.2}->count(5.2) 1
Set{3, 'test', 4.0, 4, 4.0, 'test'}->count(null) 0
Set{3, null, 4.0, null, 'test'}->count(null) 1
Bag{3, null, 4.0, null, 'test'}->count(null) 2
MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments