OCLOperators append
(Replacing message template with parser tag)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 10: Line 10:
|}
|}


Note! Append does NOT change the "source" sequence. If you want to add an object to an association, use [[OCLOperators add|.add]]
Note! Append does NOT change the "source" sequence. If you want to add an object to an association, use [[Documentation:OCLOperators add|.add]]


The opposite, excluding an object from a collection without changing the "source" collection - use [[OCLOperators excluding|excluding]].
The opposite, excluding an object from a collection without changing the "source" collection - use [[Documentation:OCLOperators excluding|excluding]].
[[Category:OCL Collection Operators]]
[[Category:OCL Collection Operators]]
{{Edited|July|12|2024}}
{{Edited|July|12|2025}}

Latest revision as of 05:10, 10 February 2025

This page was created by Alexandra on 2017-08-13. Last edited by Stephanie@mdriven.net on 2025-02-10.

->append ( object : T ) : Sequence(T)

Returns a Sequence containing all elements of self followed by object.

Expression Result
Sequence{'a', 'b'}->append('c') Sequence{'a', 'b', 'c'}

Note! Append does NOT change the "source" sequence. If you want to add an object to an association, use .add

The opposite, excluding an object from a collection without changing the "source" collection - use excluding.