Java tutorial
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.util.Collection; public class Main { /** * Returns <code>true</code> if the passed collection is not <code>null</code> * and has size > 0. */ public static boolean isNotEmpty(Collection<?> c) { return (c != null) && (c.size() > 0); } }