List of utility methods to do List Copy
List | copy(List copy if (list == null) { return null; List<T> copys = new ArrayList<T>(list.size()); for (T t : list) { copys.add(t); return copys; ... |
List | copy(List Returns a copy of the given list return new ArrayList<T>(list); |
ArrayList | copy(List copy if (original == null) return null; ArrayList<T> ret = new ArrayList<>(original.size()); for (T x : original) ret.add(x); return ret; |
List | copy(List copy List<T> res = new ArrayList<>(toCopy.size()); res.addAll(toCopy); return res; |
List | copy(List Copies the given list. if (toCopy == null) { return null; final ArrayList<T> result = new ArrayList<T>(toCopy.size()); for (final T element : toCopy) { result.add(element); return result; ... |
void | copy(List[] sourceLists, List[] destLists) copy for (int i = 0; i < sourceLists.length; i++) { destLists[i].clear(); for (int j = 0; j < sourceLists[i].size(); j++) { destLists[i].add(sourceLists[i].get(j)); |
List | copyAndClearList(List Copy items from source to target list; then clear source list and set it to null ArrayList<String> newList = null; if (sourceList != null) { newList = new ArrayList<String>(); for (int i = 0; i < sourceList.size(); i++) { String oldString = sourceList.set(i, null); String newItem = new String(oldString); oldString = null; newList.add(newItem); ... |
List | copyAndRemove(final List copy And Remove final List<String> list = new ArrayList<String>(in); list.remove(remove); return unmodifiableList(list); |
Map | copyAndSet(final Map copy And Set final Map<String, List<String>> ret = newMap(); for (final Map.Entry<String, List<String>> e : in.entrySet()) { if (!key.equals(e.getKey())) { ret.put(e.getKey(), copy(e.getValue())); ret.put(key, newList(value)); return unmodifiableMap(ret); ... |
List | copyArrayToList(Object[] input, List copy Array To List for (int i = 0; i < input.length; i++) { output.add((T) input[i]); return output; |