Here you can find the source of copyList(List
Parameter | Description |
---|---|
master | a parameter |
slave | a parameter |
public static <T> List<T> copyList(List<T> master, List<T> slave)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**/*from w ww . j a va2 s . co m*/ * Copia il contenuto della prima lista (master) nella seconda (slave). * * @param master * @param slave * @return */ public static <T> List<T> copyList(List<T> master, List<T> slave) { slave.clear(); slave.addAll(slave); return slave; } }