Here you can find the source of copy(List[] sourceLists, List[] destLists)
Parameter | Description |
---|---|
sourceLists | a parameter |
destLists | a parameter |
private static void copy(List[] sourceLists, List[] destLists)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:// w ww .j a v a 2s . c om * Actuate Corporation - initial API and implementation *******************************************************************************/ import java.util.List; public class Main { /** * * @param sourceLists * @param destLists */ private static void copy(List[] sourceLists, List[] destLists) { for (int i = 0; i < sourceLists.length; i++) { destLists[i].clear(); for (int j = 0; j < sourceLists[i].size(); j++) { destLists[i].add(sourceLists[i].get(j)); } } } }