Java tutorial
//package com.java2s; import java.util.Collection; public class Main { /** * Checks whether given collection is not null or non-empty. * @param c Colletion instance * @return true if not null or non-empty, otherwise false; */ public static boolean isNullOrEmpty(Collection c) { return c == null || c.isEmpty(); } }