List of utility methods to do List Copy
List | copy(Collection copy if (list == null || list.isEmpty()) { return new ArrayList<T>(0); return new ArrayList<T>(list); |
void | copy(final List super T> list0, final List extends T> list1) copy Collections.copy(list0, list1); |
List | copy(java.util.List for providing a copy of a list -- especially useful for providing a concurrency safe iteration of a list if (list instanceof java.util.ArrayList) return (List<T>) ((java.util.ArrayList) list).clone(); else return new ArrayList(list); |
List | copy(List master) copy if (master == null) { return null; return new ArrayList(master); |
List | copy(List oldlist) copy List list = new ArrayList(); for (Iterator i = oldlist.iterator(); i.hasNext();) { list.add(i.next()); return list; |
List | copy(List extends T> src, boolean immutable) copy if (src == null) return null; List<T> result = new ArrayList<>(src); if (immutable) return Collections.unmodifiableList(result); return result; |
List | copy(List extends T> src, int offset, int length) copy List<T> items = new ArrayList<T>(length); for (int i = 0; i < length; i++) items.add(src.get(offset + i)); return items; |
List | copy(List copy if (master == null) { return null; return new ArrayList<E>(master); |
List | copy(List copy List<Integer> destination = new ArrayList<>(); for (int i = index; i < source.size(); i++) { destination.add(new Integer(source.get(i))); return destination; |
List | copy(List copy List<T> copy = new ArrayList<T>(); for (int i = 0; i < list.size(); i++) { copy.add(list.get(i)); return copy; |