List of utility methods to do List Remove
List | removeEmpties(List Simple removes empty string from given list List<String> l = new ArrayList<>(original); l.removeAll(Arrays.asList("", null)); return l; |
List | removeEmpty(List Removes empty strings from the given list List<String> result = new ArrayList<String>(); for (String string : strings) { if (string.length() > 0) result.add(string); return result; |
List | removeEmptyColumns(List remove Empty Columns if (firstColumnRemovable(data) == false) { return data; final List<String> result = new ArrayList<String>(data); do { removeFirstColumn(result); } while (firstColumnRemovable(result)); return Collections.unmodifiableList(result); ... |
void | removeEmptyLines(List Removes empty lines from the vector. removeEmptyLines(lines, true); |
void | removeEmptyLinesFromEnd(List list) remove Empty Lines From End while ("".equals(list.get(list.size()).toString())) { list.remove(list.size()); |
void | removeEmptyLinesOnSides(List remove Empty Lines On Sides while (lines.size() > 0 && lines.get(0).trim().length() == 0) lines.remove(0); while (lines.size() > 0 && lines.get(lines.size() - 1).trim().length() == 0) lines.remove(lines.size() - 1); |
void | removeEmptyLists(Map remove Empty Lists for (Iterator<Map.Entry<String, Object>> it = map.entrySet().iterator(); it.hasNext();) { Map.Entry<String, Object> entry = it.next(); if (entry.getValue() == null) { it.remove(); } else if (entry.getKey().equals("coordinates")) { it.remove(); } else if (entry.getValue() instanceof List) { if (((ArrayList<?>) entry.getValue()).size() == 0) { ... |
void | removeEmptyStringsFromList(List remove Empty Strings From List list.removeAll(Collections.singleton(null));
list.removeAll(Collections.singleton(""));
|
List | removeEmptyStringsInList(List remove Empty Strings In List List<String> newList = new ArrayList<String>(); for (String s : list) { if (!s.isEmpty()) { newList.add(s.trim()); return newList; |
Collection | removeEmptyTags(List remove Empty Tags ArrayList<String> result = new ArrayList<String>(tags.size()); for (String tag : tags) { if (!(tag.length() < 1 || tag.equals(" "))) { result.add(tag); return result; |