Here you can find the source of isAllElementsNull(List
public static <T> boolean isAllElementsNull(List<T> list)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static <T> boolean isAllElementsNull(List<T> list) { for (Object object : list) { if (object != null) return false; }/*from www . jav a 2 s. co m*/ return true; } }