Here you can find the source of isEmpty(Collection collection)
public static boolean isEmpty(Collection collection)
//package com.java2s; /*/* ww w . j a v a 2s. c o m*/ * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ import java.util.Collection; import java.util.Map; public class Main { public static boolean isEmpty(Collection collection) { return collection == null || collection.isEmpty(); } public static boolean isEmpty(Map map) { return map == null || map.isEmpty(); } public static boolean isEmpty(Object[] objects) { return objects == null || objects.length == 0; } }