Java List Copy copyStringList(List l1)

Here you can find the source of copyStringList(List l1)

Description

copy String List

License

Apache License

Declaration

private static ArrayList<String> copyStringList(List<String> l1) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    private static ArrayList<String> copyStringList(List<String> l1) {
        if (l1 == null) {
            return null;
        }//from   www  .  j a  va 2  s.  c  o  m
        ArrayList<String> l2 = new ArrayList<String>(l1.size());
        for (String str : l1) {
            l2.add(str);
        }
        return l2;
    }
}

Related

  1. copyOf(List values)
  2. copyOfRange(List list, int from, int to)
  3. copyProbabilities(List targetProbs, List destinationProbs)
  4. copyQueryFilters(List queryFilters)
  5. copySafelyToObjectList(java.util.List list)
  6. copyStringList(List list)
  7. copyToArray(List list, float[] array)
  8. copyToArrayListWithExtraCapacity(T[] elements, int extraCapacity)
  9. copyToList(Iterable elements)