OCLOperators add
(Replacing message template with parser tag)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 9: Line 9:
|The object has been added to the existing association
|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 [[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 [[Documentation:OCLOperators append|->append.]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]
{{Edited|July|12|2024}}
{{Edited|July|12|2025}}

Latest revision as of 05:29, 10 February 2025

This page was created by Lars.olofsson@mdriven.net on 2018-10-28. Last edited by Stephanie@mdriven.net on 2025-02-10.

.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.