1,isNotEmpty(str)等价于 str != null && str != "" && str.length > 0。

2,isNotBlank(str) 等价于 str != null && str != "" && str.length > 0 && str.trim().length > 0。

同理:

1,isEmpty 等价于 str == null && str == "" || str.length == 0。

2,isBlank 等价于 str == null && str == "" || str.length == 0 || str.trim().length == 0。

相关文章: