OCLOperators intersection
No edit summary
No edit summary
Line 14: Line 14:
|Set{2,3}
|Set{2,3}
|}
|}
[[File:2019-11-25 13h29 19.png|none|thumb]]
[[File:2019-11-25 13h29 19.png|none|thumb]]See: [[Examples_on_collection_operators]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]
[[Category:OCL Collection Operators]]
[[Category:OCL Collection Operators]]

Revision as of 13:58, 14 April 2023

intersection ( bag : Bag(T) ) : Bag(T)

Returns a Bag containing all elements of self that are also contained by *bag*.

Expression Result
Bag{'a', 'b', 'a'}->intersection(Bag{'a', 'b'}) Bag{'a', 'b'}
Bag{'a', 'b', 'a', 'b'}->intersection(Bag{'a', 'b', 'b'}) Bag{'b', 'a', 'b'}
Set{1,2,3}->intersection(Set{2,3,4}) Set{2,3}
2019-11-25 13h29 19.png

See: Examples_on_collection_operators

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