Java tutorial
//package com.java2s; import java.util.*; public class Main { private static <I> boolean isNotEmpty(I[] xs) { return xs != null && xs.length > 0; } public static <I> boolean isNotEmpty(List<I> xs) { return xs != null && xs.size() > 0; } }