Here you can find the source of isEmpty(List> obj)
public static boolean isEmpty(List<?> obj)
//package com.java2s; //License from project: Apache License import java.util.List; import java.util.Map; public class Main { public static boolean isEmpty(String str) { return null == str || "".equals(str); }//www . java 2 s . c o m public static boolean isEmpty(Object[] obj) { return null == obj || 0 == obj.length; } public static boolean isEmpty(Object obj) { if (null == obj) { return true; } if (obj instanceof String) { return ((String) obj).trim().isEmpty(); } return !(obj instanceof Number) ? false : false; } public static boolean isEmpty(List<?> obj) { return null == obj || obj.isEmpty(); } public static boolean isEmpty(Map<?, ?> obj) { return null == obj || obj.isEmpty(); } }