OCLOperators add
(Created page with "=== .add ( object : T ) === Adds the ''object to'' an sequence, for example an association. {| class="wikitable" !Expression !Result |- |self.<association of type T>.add(<obj...")
 
No edit summary
Line 9: Line 9:
|}
|}
Note! Add '''changes''' the sequence or association. If you want to append (add) an object to an sequence and return the result ('''without changing''' the underlying data), use [[OCLOperators append|->append]]
Note! Add '''changes''' the sequence or association. If you want to append (add) an object to an sequence and return the result ('''without changing''' the underlying data), use [[OCLOperators append|->append]]
[[Category:OCLOperators]]

Revision as of 12:33, 7 December 2022

.add ( object : T )

Adds the object to an sequence, for example an association.

Expression Result
self.<association of type T>.add(<object : T>) The object has been added to the existing association

Note! Add changes the sequence or association. If you want to append (add) an object to an sequence and return the result (without changing the underlying data), use ->append

This page was edited 75 days ago on 02/10/2024. What links here