MDrivenWiki
Log in

OCLOperators any

From MDrivenWiki

Returns any element contained in self that validates the condition expr, null otherwise. Evaluation is shortcut as soon as an element validating expr is found. Note that the result of this on unordered collections will be random if more than one element validates expr.

Expression Result
Sequence{1.2, 2.3, 5.2, 0.9}->any(self < 1) 0.9
Sequence{1.2, 2.3, 5.2, 0.9}->any(self < 2) 1.2