Here you can find the source of countIgnoreNull(List list)
public static int countIgnoreNull(List list)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static int countIgnoreNull(List list) { int cnt = 0; for (Object i : list) if (i != null) cnt++;//from w w w . java2 s . com return cnt; } }