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

1

parent 907bc077
package com.egolm.common; package com.egolm.common;
import java.util.List;
public class ListUtil { public class ListUtil {
public static <V> boolean isEmpty(V[] sourceArray) { public static boolean isEmpty(List<?> list) {
return (sourceArray == null || sourceArray.length == 0); return list == null || list.isEmpty();
} }
public static <V> boolean isNotEmpty(V[] sourceArray) { public static boolean isNotEmpty(List<?> list) {
return (sourceArray != null && sourceArray.length > 0); 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