OCLOperators add
No edit summary
(Automatically adding template at the end of the page.)
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
Note! Add '''changes''' the sequence or association. If you want to append (add) an object to a 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 a sequence and return the result ('''without changing''' the underlying data), use [[OCLOperators append|->append.]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]
{{Edited|July|12|2024}}

Latest revision as of 15:40, 10 February 2024

.add ( object : T )

Adds the object to a 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 a sequence and return the result (without changing the underlying data), use ->append.

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