Commit 81cc19cf authored by 张永's avatar 张永

1

parent 907bc077
package com.egolm.common;
import java.util.List;
public class ListUtil {
public static <V> boolean isEmpty(V[] sourceArray) {
return (sourceArray == null || sourceArray.length == 0);
public static boolean isEmpty(List<?> list) {
return list == null || list.isEmpty();
}
public static <V> boolean isNotEmpty(V[] sourceArray) {
return (sourceArray != null && sourceArray.length > 0);
public static boolean isNotEmpty(List<?> list) {
return (list != null && list.size() > 0);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment