Here you can find the source of mergeIdAndStrings(Long accountId, Long workspaceId, List
public static List<String> mergeIdAndStrings(Long accountId, Long workspaceId, List<String> strs)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> mergeIdAndStrings(Long accountId, Long workspaceId, List<String> strs) { List<String> ps = new ArrayList<>(); for (String str : strs) { ps.add(mergeIdAndString(accountId, workspaceId, str)); }/*from w ww . java2 s. co m*/ return ps; } public static String[] mergeIdAndStrings(Long accountId, Long workspaceId, String[] strs) { String[] ps = new String[strs.length]; int i = 0; for (String str : strs) { ps[i] = mergeIdAndString(accountId, workspaceId, str); i++; } return ps; } public static String mergeIdAndString(Long accountId, Long workspaceId, String str) { return new StringBuffer().append(accountId).append("_").append(workspaceId).append("_").append(str) .toString(); } }