Java List Remove Null Value removeNulls(List list)

Here you can find the source of removeNulls(List list)

Description

remove Nulls

License

Open Source License

Declaration

public static <T> List<T> removeNulls(List<T> list) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static <T> List<T> removeNulls(List<T> list) {
        final ArrayList<T> result = new ArrayList<>(list);
        result.removeAll(Collections.singleton(null));
        return result;
    }//from  ww  w.  j a  v  a  2 s. com
}

Related

  1. removeNullElements(List list)
  2. removeNullFromList(List list)
  3. removeNulls(Collection list)
  4. removeNulls(final List list)
  5. removeNulls(List values)
  6. removeNulls(List values)
  7. removeNullValues(List targetValues, List> argumentValues)