Example usage for java.util AbstractCollection toArray

List of usage examples for java.util AbstractCollection toArray

Introduction

In this page you can find the example usage for java.util AbstractCollection toArray.

Prototype

@SuppressWarnings("unchecked")
public <T> T[] toArray(T[] a) 

Source Link

Usage

From source file:com.fluidinfo.utils.StringUtil.java

/**
 * Given a collection of strings returns them joined with a valid URI path separator.
 * @param s The strings to join// w w w.j  av a2s.c om
 * @return the resulting path
 */
public static String URIJoin(AbstractCollection<String> s) {
    return StringUtil.URIJoin(s.toArray(new String[0]));
}

From source file:com.fluidinfo.utils.StringUtil.java

/**
 * Joins a collection of strings with the specified delimiter
 * @param s The strings to join//from ww  w  .  j a  v a2  s.c  o m
 * @param delim The delimiter
 * @return The joined strings
 */
public static String join(AbstractCollection<String> s, String delim) {
    return StringUtil.join(s.toArray(new String[0]), delim);
}