Boolean expressions
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.
Collections
Empty collections are coerced to false.
Maps
Non-empty maps are coerced to true.
Matchers
Matching regex patterns are coerced to true.
h4, Strings
Non-empty Strings, GStrings and CharSequences are coerced to true.
Numbers
Non-zero numbers are coerced to true.
Object references
Non-null object references are coerced to true.
Labels