Here you can find the source of trimCollection(Collection
public static Collection<String> trimCollection(Collection<String> collectionToBeConverted)
//package com.java2s; /*L/*from w ww . j a va2 s . c o m*/ * Copyright SAIC * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/stats-analysis/LICENSE.txt for details. */ import java.util.*; public class Main { public static Collection<String> trimCollection(Collection<String> collectionToBeConverted) { Collection convertCaseValues = new ArrayList<String>(collectionToBeConverted.size()); for (Iterator<String> iterator = collectionToBeConverted.iterator(); iterator.hasNext();) { String s = iterator.next(); convertCaseValues.add(s.trim()); } return convertCaseValues; } }