Java Collection to String convertStringCollectionToString(Collection collectionString, String delemeter)

Here you can find the source of convertStringCollectionToString(Collection collectionString, String delemeter)

Description

convert String Collection To String

License

Apache License

Declaration

public static String convertStringCollectionToString(Collection<String> collectionString, String delemeter) 

Method Source Code

//package com.java2s;
/**//w ww . j av  a  2 s.c  o  m
 * Copyright (c) 2005-2009 springside.org.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *
 * $Id: ReflectionUtils.java,v 1.1 2014/11/10 06:38:51 daiyl Exp $
 */

import java.util.*;

public class Main {

    public static String convertStringCollectionToString(Collection<String> collectionString, String delemeter) {
        StringBuilder sb = new StringBuilder("");
        for (String s : collectionString) {
            if (sb.length() != 0) {
                sb.append(delemeter);
            }
            sb.append(s);
        }
        return sb.toString();
    }
}

Related

  1. convertCollectionToString( Collection strings, String separator)
  2. convertCollectionToString(Collection coll, String delimiter)
  3. convertEnumsToString(Collection> enums)
  4. convertListToString(Collection list)
  5. convertString(Collection strings)
  6. convertStringCollectionToString(Collection value, String separator)
  7. convertToString(Collection ss)
  8. convertToString(final Collection objects)
  9. listToString(Collection aList, String aDelimiter, boolean quoteEntries)