Difference between isBlank(), isNull() and isEmpty() functions
The table below lists the (boolean) values that isBlank(), isNull(), isEmpty() functions return on various possible input values below.
Input | Other Services | Creator | ||||
isBlank() | isNull() | isEmpty() | isBlank() | isNull() | isEmpty() | |
" " (text containing only spaces) | true | false | true | true | false | false |
"" (empty text) | true | true | null | true | true | true |
null | false | true | null | true | true | true |
{} (empty list) | true | false | true | true | false | true |
{" "} (or) {""} (list values) | false | false | false | false | false | false |
{" " : " "} (or) {"" : ""} (map values) | false | false | false | null | null | false |