Groovy supports the standard conditional operators on boolean expressions, e.g.:
In addition, Groovy has special rules for coercing non-boolean objects to a boolean value.
Empty collections are coerced to false.
Iterators and Enumerations with no further elements are coerced to false.
Non-empty maps are coerced to true.
Matching regex patterns are coerced to true.
Non-empty Strings, GStrings and CharSequences are coerced to true.
Non-zero numbers are coerced to true.
Non-null object references are coerced to true.