Java List Copy copy(List list)

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

Description

copy

License

Open Source License

Declaration

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

Method Source Code


//package com.java2s;

import java.util.ArrayList;
import java.util.List;

public class Main {

    public static <T> List<T> copy(List<T> list) {
        List<T> copy = new ArrayList<T>();
        for (int i = 0; i < list.size(); i++) {
            copy.add(list.get(i));// w  ww .  j  av  a  2s . c  o m
        }
        return copy;
    }
}

Related

  1. copy(List oldlist)
  2. copy(List src, boolean immutable)
  3. copy(List src, int offset, int length)
  4. copy(List master)
  5. copy(List source, int index)
  6. copy(List list)
  7. copy(List list)
  8. copy(List original)
  9. copy(List toCopy)