OCLOperators collect
No edit summary
(Automatically adding template at the end of the page.)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Iterate over the collection and build a tuple result.
Returns a collection containing the result of applying ''expr'' on all elements contained in ''self''.  
 
{| class="wikitable"
If you run into poor performance using this - read this [[Collect_very_slow]] - the Collect operator is very good and does not have know flaws - but still mistakes can be made.
!Expression
 
!Result
[[Category:OCLOperators]]
|-
|Sequence{'first', 'second'}->collect(toUpper())
|Sequence{'FIRST', 'SECOND'}
|}
[[Category:OCL Collection Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:41, 10 February 2024

Returns a collection containing the result of applying expr on all elements contained in self.

Expression Result
Sequence{'first', 'second'}->collect(toUpper()) Sequence{'FIRST', 'SECOND'}
This page was edited 93 days ago on 02/10/2024. What links here