List of utility methods to do List Null Empty
List | emptyStringList() empty String List return new ArrayList<String>(); |
List | emptyToNull(List empty To Null if (isEmpty(list)) { return null; return list; |
List | emptyToNull(List empty To Null return list == null ? null : (list.isEmpty() ? null : list);
|
boolean | equalsEmptyEqNull(List equals Empty Eq Null if ((list1 == null || list1.isEmpty()) && (list2 == null || list2.isEmpty())) { return true; if (list1 == null || list2 == null) { return false; for (int i = 0; i < list1.size(); i++) { if (!list1.get(i).equals(list2.get(i))) { ... |
boolean | equalsNullSafe(List equals Null Safe if (list1 == list2) { return true; if (list1 == null) { return list2 == null; if (list2 == null) { return list1 == null; ... |
void | fillEmptyEntries(Iterable extends Long> keys, Map Adds a references to the empty list for keys to the map that are currently not yet contained in this map. for (Long processId : keys) { if (!map.containsKey(processId)) { List<T> empty = Collections.emptyList(); map.put(processId, empty); |
void | fillNull(final List fill Null if (numElements < list.size()) return; final int iterations = numElements - list.size(); for (int i = 0; i < iterations; i++) { list.add(null); |
void | fillNull(List lst, int size) fill Null for (int i = lst.size(); i < size; i++) { lst.add(null); |
List | fillUpWithNulls(List Expands an integer list to a size equal to its value range and adds null -value entries for every missing intermediate integer value.
return fillUpWithNulls(list, null);
|
List | getEmptyList(Class get Empty List return (List<T>) emptyList;
|