Here you can find the source of removeNull(List list)
Parameter | Description |
---|---|
list | a parameter |
public static List removeNull(List list)
//package com.java2s; /*L/*from www . j a v a 2 s .co m*/ * Copyright Washington University in St. Louis, SemanticBits, Persistent Systems, Krishagni. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/wustl-common-package/LICENSE.txt for details. */ import java.util.ArrayList; import java.util.List; public class Main { /** * @param list * @return */ public static List removeNull(List list) { List nullFreeList = new ArrayList(); for (int i = 0; i < list.size(); i++) { if (list.get(i) != null) { nullFreeList.add(list.get(i)); } } return nullFreeList; } }