Java List Merge doMerge(List list, String sep)

Here you can find the source of doMerge(List list, String sep)

Description

do Merge

License

Open Source License

Declaration

private static String doMerge(List<String> list, String sep) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU Affero General Public License as published by

import java.util.List;

public class Main {
    private static String doMerge(List<String> list, String sep) {
        StringBuilder builder = new StringBuilder();
        for (String s : list) {
            builder.append(s);/*from ww  w .  j  a  v  a  2  s . c o m*/
            builder.append(sep);
        }
        return builder.toString();
    }
}

Related

  1. getMergedLines(List strings)
  2. getMergedSpeakerList()
  3. getMergeindexes(List spans, List indexes)
  4. mapMergeAdd(Map> map, Map> mapToAdd)