Java List Copy copy(List toCopy)

Here you can find the source of copy(List toCopy)

Description

copy

License

Open Source License

Declaration

public static <T> List<T> copy(List<T> toCopy) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static <T> List<T> copy(List<T> toCopy) {
        List<T> res = new ArrayList<>(toCopy.size());
        res.addAll(toCopy);/*  w  ww.j  a  v  a 2 s  .  co  m*/
        return res;
    }
}

Related

  1. copy(List source, int index)
  2. copy(List list)
  3. copy(List list)
  4. copy(List list)
  5. copy(List original)
  6. copy(List toCopy)
  7. copy(List[] sourceLists, List[] destLists)
  8. copyAndClearList(List sourceList)
  9. copyAndRemove(final List in, final String remove)