CollectionUtil:判断集合不为空
public static boolean isNotEmpty(Object object) {
if(object instanceof List){
List list = (List)object;
if(list != null && list.size() > 0){
return true;
} else {
return false;
}
} else if(object instanceof Map){
Map map = (Map)object;
if(map != null && map.size() > 0){
return true;
} else {
return false;
}
} else if(object instanceof Set){
Set<?> set = (Set) object;
if(set != null && set.size() > 0){
return true;
} else {
return false;
}
}else{
return false;
}
}