Here you can find the source of removeEmpties(List
Parameter | Description |
---|---|
original | The original string list |
public static List<String> removeEmpties(List<String> original)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**/* www . j a v a2 s. c o m*/ * Simple removes empty string from given list * * @param original The original string list * @return The result as list */ public static List<String> removeEmpties(List<String> original) { List<String> l = new ArrayList<>(original); l.removeAll(Arrays.asList("", null)); return l; } }