OCLOperators difference
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The difference between 2 collections: collection2 subtracted from collection1.

Example: for A,B,C,D and B,C,D,E,F the difference is A.

Set{'a','b','c','d'}->difference(Set{'b','c','d','e'})
= 'a'

Set{'a','b','c','d','e'}->difference(Set{'b','c','d','e'})
= 'a'

Set{'a','b','c','d','e','f'}->difference(Set{'b','c','d','e'})
='a','f'
Set{'a','b','c','d','e','f'}->difference(Set{'a','b','c','d','e','f'})
= empty
Set{'a','b','c','d','e','f'}->difference(Set{'a','b','c','d','e','f','g'})
= empty
Set{'a','b','c','d','e','f','g'}->difference(Set{'a','b','c','d','e','f'})
= 'g'
2019-11-25 13h27 03.png

See: Examples_on_collection_operators

In Linq, this can be achieved with "Except".

See also: OCLOperators_symmetricDifference

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