Java List Clone cloneStringList(List list)

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

Description

clone String List

License

Open Source License

Declaration

private static List<String> cloneStringList(List<String> list) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2014 Salesforce.com, inc..
 * 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
 * /* ww w  . j a v  a2 s .com*/
 * Contributors:
 *     Salesforce.com, inc. - initial API and implementation
 ******************************************************************************/

import java.util.ArrayList;

import java.util.List;

public class Main {
    private static List<String> cloneStringList(List<String> list) {
        List<String> copiedList = new ArrayList<String>();
        for (String s : list) {
            copiedList.add(s);
        }
        return copiedList;
    }
}

Related

  1. cloneList(List l)
  2. cloneListExcludingAttribute(String attribute, List attributes)
  3. cloneListOfStrings(List list)
  4. cloneMerchantList(List merchantIDs)
  5. cloneProbabilities( List targetProbs)
  6. cloneStringList(List list)
  7. cloneStringList(List toClone)
  8. cloneToList(final Collection list)
  9. getClone(List> lls)