Java tutorial
//package com.java2s; import java.util.List; public class Main { public static <D> boolean isEmpty(List<D> list) { return list == null || list.isEmpty(); } }