General functions
The function... | checks whether... |
---|---|
isEmpty (value) | A value is empty, null or does not contain any element. |
isNotEmpty (value) | A value is not empty. |
isEqual (value1, value2) | A value is the same as a second value. |
isNotEqual (value1, value2) | A value is not the same as a second value. |
isIn (value, Collection) | A value is part of a collection. |
areIn (Collection values, Collection collection) | A collection is part of another collection. |
isAny (Collection, Closure) | Any value of a collection meets the criteria of a validation closure. |
isEvery (Collection, Closure) | All values of a collection meet the criteria of a validation closure. |
isFalse (value) |
A value is false, empty or null according to the Groovy truth. Examples:
|
isTrue (value) |
A value is true, empty or null according to the Groovy truth. Examples:
|
isUnique (Collection, Closure) |
All values in a collection are unique. Examples:
Examples: The closure
|
validate (value) | A value is a valid function, accepting any closure that is capable of returning true or false. Tip Validate (value) is a general validation function used to check another function. |