OCLOperators append
No edit summary
No edit summary
Line 1: Line 1:
Add another object last
=== ->append ( object : T ) : Sequence(T) ===
Returns a Sequence containing all elements of ''self'' followed by ''object''.
{| class="wikitable"
!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 [[OCLOperators add|.add]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]

Revision as of 15:18, 28 October 2018

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

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments