Java Collection Join join(String separator, Collection items)

Here you can find the source of join(String separator, Collection items)

Description

join

License

Open Source License

Declaration

public static String join(String separator, Collection<?> items) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    public static String join(String separator, Collection<?> items) {
        StringBuilder sb = new StringBuilder();
        for (Object item : items)
            if (item != null)
                sb.append(separator).append(item);
        return sb.substring(separator.length());
    }/*from  w  ww  . j a v  a2 s  .co m*/
}

Related

  1. join(String sep, Collection values)
  2. join(String sep, Collection strings)
  3. join(String sep, Collection strs)
  4. join(String separator, Collection c)
  5. join(String separator, Collection c)
  6. join(String separator, Collection items)
  7. join(String separator, Collection objs)
  8. join(String separator, Collection list)
  9. join(String separator, Collection parts)