OCLOperators includesAll
Created by Alexandra on 2017-08-13 · Last edited by Peter.byaruhanga on 2026-01-24.
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,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 like integers, float or string to avoid errors
