Here you can find the source of isEmptyCollection(Collection> collection)
public static boolean isEmptyCollection(Collection<?> collection)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004-2010 Sunil Kamath (IcemanK). * All rights reserved.//from w w w . ja v a 2s .co m * This program is made available under the terms of the Common Public License * v1.0 which is available at http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * Sunil Kamath (IcemanK) - initial API and implementation *******************************************************************************/ import java.util.*; public class Main { public static boolean isEmptyCollection(Collection<?> collection) { if (collection != null) { return collection.size() == 0; } return true; } }