Java Collection Split split(Collection collections, String separator)

Here you can find the source of split(Collection collections, String separator)

Description

split

License

Apache License

Declaration

public static String split(Collection<?> collections, String separator) 

Method Source Code

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

import java.util.Collection;

public class Main {

    public static String split(Collection<?> collections, String separator) {

        Object[] array = collections.toArray(new Object[0]);
        int length = array.length;
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < length; i++) {
            stringBuilder.append(array[i]);
            if (i != length - 1) {
                stringBuilder.append(separator);
            }//from   ww w  . j a  v a 2  s  .co  m
        }
        return stringBuilder.toString();
    }
}

Related

  1. fastSplit(final Collection result, final String text, final char separator)
  2. getCollectionStringBySplit(Collection collection, String split)
  3. getStringCollection(String str, String split)
  4. getSymbolSplitString(Collection collection, String symbol)
  5. split(Collection d, int n)
  6. split(Collection orig, int batchSize)
  7. split(Collection set, int n)
  8. split(final Collection collection)
  9. splitAndKeepEscapedSpaces(String string, boolean preserveEscapes, Collection into)