Here you can find the source of isEmpty(Collection> objs)
public static boolean isEmpty(Collection<?> objs)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static boolean isEmpty(Object objs) { if (objs == null) { return true; }/*from w w w .j a va 2 s . co m*/ return false; } public static boolean isEmpty(Object[] objs) { if ((objs == null) || (objs.length == 0)) { return true; } return false; } public static boolean isEmpty(Collection<?> objs) { if ((objs == null) || (objs.size() <= 0)) { return true; } return false; } public static boolean isEmpty(byte[] objs) { if ((objs == null) || (objs.length == 0)) { return true; } return false; } public static boolean isEmpty(String str) { if ((str == null) || (str.trim().length() == 0)) { return true; } return false; } public static boolean isEmpty(Long l) { if ((l == null) || (l.longValue() == 0L)) { return true; } return false; } }