Java tutorial
//package com.java2s; import android.text.TextUtils; import java.util.Collection; public class Main { public static boolean isNotEmpty(String str) { return !TextUtils.isEmpty(str); } public static boolean isNotEmpty(Collection<?> coll) { return coll != null && !coll.isEmpty(); } }