OCLOperators union
No edit summary
No edit summary
Line 1: Line 1:
The set of objects in collection1 and objects in collection2
=== union ( bag : Bag(T) ) : Bag(T) ===
Returns a Bag containing all elements of ''self'' and all elements of *bag*.
{| class="wikitable"
!Expression
!Result
|-
|Bag{'a', 'b', 'a'}->union(Bag{'b', 'c'})
|Bag{'b', 'a', 'b', 'a', 'c'}
|}
[[Category:OCLOperators]]
[[Category:OCLOperators]]

Revision as of 14:42, 18 November 2019

union ( bag : Bag(T) ) : Bag(T)

Returns a Bag containing all elements of self and all elements of *bag*.

Expression Result
Bag{'a', 'b', 'a'}->union(Bag{'b', 'c'}) Bag{'b', 'a', 'b', 'a', 'c'}
This page was edited 70 days ago on 02/10/2024. What links here