Concatenates the given collection of strings into a single string where values are separated
with a semicolon.
@param col string collection
@return concatenated string
333876
private static String concat(Collection<String> col)
	{
		StringBuilder b = new StringBuilder();
		boolean first = true;
		for (String s : col)
		{
			if (first)
				first = false;
			else
				b.append(";");

			b.append(s);
		}
		return b.toString();
	}
1229086
public static String join(String delimiter, String... parts) {
    if (parts == null) {
      return null;
    }

    if (delimiter == null) {
      delimiter = "";
    }

    StringBuilder stringBuilder = new StringBuilder();
    for (int i=0; i < parts.length; i++) {
      if (i > 0) {
        stringBuilder.append(delimiter);
      }
      stringBuilder.append(parts[i]);
    }
    return stringBuilder.toString();
  }
245823
public static String joiningWithDelimiter(CharSequence delimiter,
            String... strings) {
        return joiningWith(Arrays.stream(strings), delimiter);
    }
705767
public static String join(Collection<? extends Object> lst, String separator) {
        StringBuilder buf = new StringBuilder(lst.size() * 64);
        boolean first = true;
        for (Object value : lst) {
            if (first) first = false; else buf.append(separator);
            buf.append(value.toString());
        }
        return buf.toString();
    }
1042843
@Nonnull
    public static String join(@Nonnull Collection<?> strings, @Nonnull String separator) {
        StringBuilder buf = new StringBuilder();
        boolean first=true;
        for (Object s : strings) {
            if(first)   first=false;
            else        buf.append(separator);
            buf.append(s);
        }
        return buf.toString();
    }
953228
public static String join(Collection<String> s, String delimiter) {
        return join(s, delimiter, false);
    }
424366
private static String join(String sep, Collection<String> collection) {
    StringBuilder builder = new StringBuilder();
    boolean first = true;
    for (String element : collection) {
      if (first) {
        first = false;
      } else {
        builder.append(sep);
      }
      builder.append(element);
    }
    return builder.toString();
  }
933841
public static StringBuilder toStringBuilder(Collection<? extends Object> collection, String delimiter) {
        StringBuilder sb = new StringBuilder(collection.size() * 20);
        for (Iterator<? extends Object> it = collection.iterator(); it.hasNext();) {
            Object cs = it.next();
            sb.append(cs);
            if (it.hasNext()) {
                sb.append(delimiter);
            }
        }
        return sb;
    }
247795
@SuppressWarnings("rawtypes")
    public static String join(final Collection<?> col, final String separator,
            final boolean ignoreEmptyElement, final boolean trim, final ElementConverter elementConverter) {

        final List<Object> list = new ArrayList<Object>();
        for(Object element : col) {
            if(element == null) {
                continue;
            }

            Object value = element;

            if(element instanceof String) {
                String str = (String) element;
                if(ignoreEmptyElement && isEmpty(str)) {
                    continue;

                } else if(trim) {
                    value = str.trim();
                }

            } else if(element instanceof Character && isEmpty(element.toString())) {
                String str = element.toString();
                if(ignoreEmptyElement && isEmpty(str)) {
                    continue;

                } else if(trim) {
                    value = str.trim().charAt(0);
                }

            } else if(char.class.isAssignableFrom(element.getClass())) {
                String str = element.toString();
                if(ignoreEmptyElement && isEmpty(str)) {
                    continue;

                } else if(trim) {
                    value = str.trim().charAt(0);
                }
            }

            list.add(value);

        }

        return join(list, separator, elementConverter);

    }
867792
public static String groupConcat(String column, String separator, String alias) {
		return "group_concat(" + column + ", '" + separator + "') AS " + alias;
	}
350987
public static String joiningWithDelimiter(CharSequence delimiter,
            List<String> stringList) {
        return joiningWith(stringList.stream(), delimiter);
    }
490804
public static String join( Collection col, char sep )
	{
		if( col.isEmpty() )
		{
			return "";
		}
		StringBuffer buffer = new StringBuffer();
		boolean first = true; 
		for (Object o : col)
		{
			if( first )
			{
				first = false;
			}
			else
			{
				buffer.append( sep );
			}
			buffer.append( o.toString() );
		}
		return buffer.toString();
	}
251695
public static String join(final Collection<?> collection, final String delimiter) {
        
        if(collection == null || collection.isEmpty()) {
            return "";
        }
        
        String value = collection.stream()
                .map(v -> v.toString())
                .collect(Collectors.joining(defaultString(delimiter)));
        
        return value;
    }
1256362
static String join(String sep, String... elements) {
    StringBuilder sb = new StringBuilder();
    for (String e : elements) {
      if (e != null) {
        if (sb.length() > 0) {
          sb.append(sep);
        }
        sb.append(e);
      }
    }
    return sb.toString();
  }
535439
public static String joinWithInnerSeparator(String separator,
                                                Object... collection) {
        StringBuilder b = new StringBuilder();
        boolean first = true;

        for (Object o : collection) {
            if (first) {
                first = false;
            } else {
                b.append(separator);
            }
            b.append(o.toString());
            b.append(separator);
        }
        return b.toString();
    }
651162
public ColumnMapper getMapper(String field) {
        String[] components = field.split("\\.");
        for (int i = components.length - 1; i >= 0; i--) {
            StringBuilder sb = new StringBuilder();
            for (int j = 0; j <= i; j++) {
                sb.append(components[j]);
                if (j < i) sb.append('.');
            }
            ColumnMapper columnMapper = columnMappers.get(sb.toString());
            if (columnMapper != null) return columnMapper;
        }
        return null;
    }
492194
public static String format(Collection<String> d, String sep) {
    if(d == null) {
      return "null";
    }
    if(d.isEmpty()) {
      return "";
    }
    if(d.size() == 1) {
      return d.iterator().next();
    }
    int len = sep.length() * (d.size() - 1);
    for(String s : d) {
      len += s.length();
    }
    Iterator<String> it = d.iterator();
    StringBuilder buffer = new StringBuilder(len) //
        .append(it.next());
    while(it.hasNext()) {
      buffer.append(sep).append(it.next());
    }
    return buffer.toString();
  }