🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators includesAll

Returns true if all the elements in the parameter list are included in the list.

Returns true if all elements of *c2* are contained in self; otherwise, returns false.

Expression Result
Sequence{2.3, 5.2, 'a', 3, null}->includesAll(Set{3, null}) true
Sequence{2.3, 5.2, 'a', 3}->includesAll(Set{3, null}) false


Example

Sequence{2,4,3}->includesAll(Set{3,4})

The above will return true because 3 and 4 are in the sequence.

Sequence{2,4,3}->includesAll(Set{3,4,7})

This will return false because 7 is not in the sequence.

Note.

The sequence has to be of the same type, such as integers, floats, or strings, to avoid errors