Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static boolean isNotEmpty(Collection collection) { return !isEmpty(collection); } /** * Checks if the given array is null or its length is empty * * @param collection * @return */ public static boolean isEmpty(Collection collection) { if (collection == null) return true; if (collection.size() == 0) return true; return false; } }