OCLOperators foreach
No edit summary
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
'''Note: This is an EAL operator'''
'''Note: This is an EAL operator'''


Line 9: Line 10:
|The method DoSomething is called once on each of the objects in (list of objects)
|The method DoSomething is called once on each of the objects in (list of objects)
|}
|}
To iterate and return a list as the result, use [[OCLOperators collect|collect]].
To iterate and return a list as the result, use [[Documentation:OCLOperators collect|collect]].
[[Category:OCLOperators]]
[[Category:OCLOperators]]
[[Category:EAL]]
[[Category:EAL]]
{{Edited|July|12|2025}}
[[Category:OCL Collection Operators]]

Latest revision as of 05:07, 11 February 2025

This page was created by Lars.olofsson@mdriven.net on 2021-12-13. Last edited by Stephanie@mdriven.net on 2025-02-11.

Note: This is an EAL operator

It iterates a collection containing and executing the expression on all elements contained in self.

Expression Result
(list of objects)->forEach(str | str.DoSomething) The method DoSomething is called once on each of the objects in (list of objects)

To iterate and return a list as the result, use collect.