当前位置:网站首页>Judge whether the string type is empty and whether the list set is empty

Judge whether the string type is empty and whether the list set is empty

2022-06-22 01:15:00 Elegant development

These two need to be imported Apache My bag

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;


// Determines if the set is empty 
List list = new ArratList<>();
CollectionUtils.isEmpty(list);
CollectionUtils.isNotEmpty(list);
 The return is boolean type ture and false

// Judge String Whether the type is empty 
String string = new String();
StringUtils.isBlank(string);
StringUtils.isNotBlank(string);
 The return is boolean type ture and false
原网站

版权声明
本文为[Elegant development]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220012540484.html