mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add empty validae
This commit is contained in:
@@ -494,10 +494,11 @@ public class ListUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个空List
|
||||
* 获取一个空List,这个空List不可变
|
||||
*
|
||||
* @param <T> 元素类型
|
||||
* @return 空的List
|
||||
* @see Collections#emptyList()
|
||||
* @since 5.2.6
|
||||
*/
|
||||
public static <T> List<T> empty() {
|
||||
|
@@ -153,6 +153,10 @@ public class IdcardUtil {
|
||||
* @return 是否有效
|
||||
*/
|
||||
public static boolean isValidCard(String idCard) {
|
||||
if(StrUtil.isBlank(idCard)){
|
||||
return false;
|
||||
}
|
||||
|
||||
idCard = idCard.trim();
|
||||
int length = idCard.length();
|
||||
switch (length) {
|
||||
|
Reference in New Issue
Block a user