List of utility methods to do List Value Add All
List | addAllUniqueId(List Adds all object from second list to first list (creates first list if missing). if (aList == null) aList = new ArrayList(); for (T object : theObjects) if (!containsId(aList, object)) aList.add(object); return aList; |
List | addAllUniqueToList(List objects, List objectsToAdd) add All Unique To List if (objectsToAdd == null) { return objects; int size = objectsToAdd.size(); for (int index = 0; index < size; index++) { Object element = objectsToAdd.get(index); if (!objects.contains(element)) { objects.add(element); ... |
void | addAllWords(String text, List add All Words int start = 0; while (start < text.length()) { int next = nextWord(text, start); result.add(text.substring(start, next)); start = next; |
void | addArrayToList(List list, String as[]) add Array To List if (as != null) { for (int i = 0; i < as.length; i++) list.add(as[i]); |
List | addArrayToList(List Add the contents of the array to the list List<Double> copiedList = new ArrayList<>(list); if (array == null) { copiedList.add(null); copiedList.add(null); } else { for (int i = 0; i < array.length; i++) { copiedList.add(array[i]); return copiedList; |
void | addArrayToList(List add Array To List if (isEmpty(list)) { return; for (T t : array) { list.add(t); |
void | addArrayToList(String[] array, List add Array To List for (int i = 0; i < array.length; i++) { list.add(array[i]); |
List | addArrayToList(T[] array, List add Array To List if (list == null || array == null) return null; for (T object : array) { list.add(object); return list; |
void | addToList(List list, Object obj) add To List list.add(obj); |
void | addToList(List Convenience method to add an item to a list. if (item != null) {
list.add(item);
|