Here you can find the source of isEmpty(List
public static boolean isEmpty(List<String> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static boolean isEmpty(List<String> list) { if (list == null || list.size() == 0) { return true; }/* w w w. j a v a 2 s . c om*/ if (list.size() == 1 && isEmpty(list.get(0))) { return true; } return false; } public static boolean isEmpty(String str) { if (str != null && str.trim().length() > 0) { return false; } return true; } }