Here you can find the source of isEmpty(Collection> collection)
public static boolean isEmpty(Collection<?> collection)
//package com.java2s; import java.util.Collection; public class Main { public static boolean isEmpty(Collection<?> collection) { if (size(collection) == 0) { return true; }/*ww w .j a v a 2s .c om*/ return false; } /** * Get the size of specified collection. */ public static int size(Collection<?> collection) { if (collection == null) { return 0; } return collection.size(); } }