OCLOperators less than or equal to
Created by Charles on 2025-11-18 · Last edited by Colline.ssali on 2026-01-29.
Symbol (<=)
The <= operator is a comparison operator used to check whether the value on the left-hand side is less than or equal to the value on the right-hand side. It returns a Boolean result (true or false) and is commonly used in OCL constraints and validation rules.
Department.allInstances->forAll(d | d.EmployeeCount <= 50)Results
The department can have at most 10 employees
- If EmployeeCount is 10 or less, the expression returns true
- If it is greater than 50, it returns false
