Here you can find the source of isEmpty(Collection> collection)
public static boolean isEmpty(Collection<?> collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static boolean isEmpty(String string) { return string == null || string.isEmpty(); }//from w w w .ja v a 2 s.c o m public static boolean isEmpty(Object[] array) { return array == null || array.length == 0; } public static boolean isEmpty(Iterable<?> iterable) { return iterable == null || !iterable.iterator().hasNext(); } public static boolean isEmpty(Collection<?> collection) { return collection == null || collection.isEmpty(); } }