List of utility methods to do List Value Add
List | add(List add final ArrayList<T> result = new ArrayList<T>(list.size() + 2); result.addAll(list); result.add(element); return result; |
void | add(Map add put(multiValueMap, key, value, false); |
List | add(Object o, List oldList) add List newList; if (oldList == null) { newList = new ArrayList(1); } else { newList = new ArrayList(oldList.size() + 1); newList.addAll(oldList); newList.add(o); ... |
List | addElement(T element, List add Element boolean exists = false; if (list == null) { list = new ArrayList<T>(2); } else { exists = list.contains(element); if (!exists) list.add(element); ... |
void | addElementIfAbsent(List Adds element as the last element of the List, if not already present within the List. if (!l.contains(element)) {
l.add(element);
|
void | addElements(boolean removeDuplicates, final List add Elements for (E item : elements) { if (removeDuplicates) { if (!result.contains(item)) { result.add(item); } else { result.add(item); |
boolean | addElements(List add Elements boolean good = true; for (T obj : array) { good &= list.add(obj); return good; |
void | addElementsIfAbsent(List Adds the elements contained in aList that are not already present in the List to the end of the List. if (aColl == null) { return; Iterator<? extends T> i = aColl.iterator(); while (i.hasNext()) { addElementIfAbsent(destList, i.next()); |
List | appendToList(List list, A elem) Return a new list with element appended to previous list. List<A> answer = new ArrayList<A>(list); answer.add(elem); return answer; |
List | appendToList(List append To List List<T> result = new ArrayList<T>(list.size() + elements.length); result.addAll(list); result.addAll(Arrays.asList(elements)); return result; |