Here you can find the source of copyStringCollection(Collection
private static Collection<String> copyStringCollection(Collection<String> strings)
//package com.java2s; /*L/*from ww w. j av a 2 s .c o m*/ * Copyright The General Hospital Corporation d/b/a Massachusetts General Hospital * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/digital-model-repository/LICENSE.txt for details. */ import java.util.ArrayList; import java.util.Collection; public class Main { private static Collection<String> copyStringCollection(Collection<String> strings) { if (strings == null) { return null; } Collection<String> result = new ArrayList<String>(strings.size()); result.addAll(strings); return result; } }