Here you can find the source of isEmptyCollection(Collection list)
@SuppressWarnings("rawtypes") public static boolean isEmptyCollection(Collection list)
//package com.java2s; /*L//from ww w. j av a2 s . c o m * Copyright SAIC, Ellumen and RSNA (CTP) * * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details. */ import java.util.Collection; public class Main { @SuppressWarnings("rawtypes") public static boolean isEmptyCollection(Collection list) { boolean empty = false; if (list != null && list.size() > 0) { empty = false; } else { empty = true; } return empty; } }