OCLOperators collect
No edit summary
No edit summary
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
|-
|Sequence{'first', 'second'}->collect(toUpper())
|Sequence{'FIRST', 'SECOND'}
|}
[[Category:OCLOperators]]
[[Category:OCLOperators]]

Revision as of 08:03, 11 November 2019

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 82 days ago on 02/10/2024. What links here