Java tutorial
//package com.java2s; import java.util.Collection; public class Main { /** * Check is a collection is empty */ public static boolean isEmpty(Collection<?> cl) { return !isNotEmpty(cl); } /** * Check is a collection is not empty */ public static boolean isNotEmpty(Collection<?> cl) { return ((cl != null) && (cl.size() > 0)); } }