笑傲Java面试:面霸修炼手册
v: ititit111222333
public static boolean isEmpty(Collection coll) {
return isNull(coll) || coll.isEmpty();
}
public static boolean isEmpty(Map map) {
return isNull(map) || map.isEmpty();
}
public static boolean isEmpty(Object[] array) {
return isNull(array) || array.length == 0;
}
public static boolean isNotEmpty(Object obj) {
return !isEmpty(obj);
}
public static boolean isNotEmpty(CharSequence cs) {
return !isEmpty(cs);
}
public static boolean isNotEmpty(Collection coll) {
return !isEmpty(coll);
}
public static boolean isNotEmpty(Map map) {
return !isEmpty(map);
}
public static boolean isNotEmpty(Object[] array) {
return !isEmpty(array);
}