Here you can find the source of addPrefix(Collection
public static Collection<String> addPrefix(Collection<String> values, String prefix)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collection; public class Main { public static Collection<String> addPrefix(Collection<String> values, String prefix) { Collection<String> newValues = new ArrayList<String>(); for (String value : values) { newValues.add(prefix + value); }//from w w w.j ava2 s. c om return newValues; } }