Java Collection Join join(String delimiter, Collection stringCollection)

Here you can find the source of join(String delimiter, Collection stringCollection)

Description

join

License

Apache License

Declaration

public static String join(String delimiter, Collection<String> stringCollection) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    public static String join(String delimiter, Collection<String> stringCollection) {
        StringBuilder sb = new StringBuilder(stringCollection.size() * (16 + delimiter.length()));
        for (String str : stringCollection) {
            sb.append(str).append(delimiter);
        }/*  ww w. j  a  va 2 s  .co m*/

        return sb.toString();
    }
}

Related

  1. join(String delimiter, Collection a)
  2. join(String delimiter, Collection items)
  3. join(String delimiter, Collection objects)
  4. join(String delimiter, Collection parts)
  5. join(String delimiter, Collection items)
  6. join(String delimiter, Collection strings)
  7. join(String delimiter, Collection values)
  8. join(String glue, Collection c)
  9. join(String glue, Collection pieces)