Java List Copy copy(List source, int index)

Here you can find the source of copy(List source, int index)

Description

copy

License

Open Source License

Parameter

Parameter Description
source a parameter

Declaration

public static List<Integer> copy(List<Integer> source, int index) 

Method Source Code


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

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

public class Main {
    /**/* w w w.  j a va 2 s  .c  o m*/
     *
     * @param source
     * @return
     */
    public static List<Integer> copy(List<Integer> source, int index) {
        List<Integer> destination = new ArrayList<>();
        for (int i = index; i < source.size(); i++) {
            destination.add(new Integer(source.get(i)));
        }
        return destination;
    }
}

Related

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