🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators isEmpty
This page was created by Alexandra on 2017-08-13. Last edited by Edgar on 2025-08-31.

isEmpty () : Boolean

Returns true if self is empty - otherwise, returns false.

Expression Result
Sequence{2, 'a'}->isEmpty() false
Sequence{null}->isEmpty() false
Sequence{}->isEmpty() true
Warning!

Never use ->isEmpty on a value type. The value will be converted to a list (with the value as its only item) and that will always evaluate as False.

See also: OCLOperators notEmpty