Joing the values together in a comma separated list
@param values The values to join
@return The combined values
357941
protected String join(Object[] values)
    {
        StringBuilder sb = new StringBuilder(100);
        if(values.length == 0)
            return sb.toString();

        sb.append(values[0]);

        if(values.length == 1)
            return sb.toString();

        for (int i = 1; i < values.length; i++)
        {
            sb.append(",").append(values[i]);
        }

        return sb.toString();
    }
787940
public static List<String> splitToList(final String value) {
        if (!StringUtils.isEmpty(value)) {
            return COMMA_SPLITTER.splitToList(value);
        }
        return Collections.<String> emptyList();
    }
1371034
public static String join(String[] strings) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < strings.length; i++) {
            builder.append(strings[i]);
            if (i + 1 < strings.length) builder.append(",");
        }
        return builder.toString();
    }
953228
public static String join(Collection<String> s, String delimiter) {
        return join(s, delimiter, false);
    }
925186
function join(joiner, ...values) {
    if (values.length > 0) {
      return concat([],...values).join(joiner);
    }

    // Manually currying
    return (...values) => join(joiner, ...values);
  }
14920
synchronized public Object[] toArray(Object[] values) {
    int count = 0;
    for (int bind = 0; bind < buckets.length; bind++) {
      if (counts[bind] > 0)
         System.arraycopy(buckets[bind], 0, values, count, counts[bind]);
      count += counts[bind];
    }
    return values;
  }
251809
@SafeVarargs
    public final List<V> putValues(String name, V... values) {
        List<V> list = new ArrayList<>();
        list.addAll(Arrays.asList(values));
        return super.put(name, list);
    }
350987
public static String joiningWithDelimiter(CharSequence delimiter,
            List<String> stringList) {
        return joiningWith(stringList.stream(), delimiter);
    }
776712
public static <E> List<E> newArrayList(E... values) {
    List<E> list = new ArrayList<E>(values.length);
    for (E e : values) {
      list.add(e);
    }
    return list;
  }
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();
    }
531297
@Nonnull
    public static <T> List<T> join(@Nonnull Collection<? extends T>... items) {
        int size = 0;
        for (Collection<? extends T> item : items)
            size += item.size();
        List<T> r = new ArrayList<>(size);
        for (Collection<? extends T> item : items)
            r.addAll(item);
        return r;
    }
1162091
public static JsonArray array(int... values) {
    if (values == null) {
      throw new NullPointerException(VALUES_IS_NULL);
    }
    JsonArray array = new JsonArray();
    for (int value : values) {
      array.add(value);
    }
    return array;
  }
492768
public static <T> List<T> asArrayList(T[] values) {
    ArrayList<T> result = new ArrayList<T>();
    Collections.addAll(result, values);

    return result;
  }
1172305
public static List<SoyValueProvider> concatLists(List<SoyList> args) {
    ImmutableList.Builder<SoyValueProvider> flattened = ImmutableList.builder();
    for (SoyList soyList : args) {
      flattened.addAll(soyList.asJavaList());
    }
    return flattened.build();
  }
533062
public String[] buildWhereArgs(Collection<Object> values) {
		List<String> selectionArgs = new ArrayList<String>();
		for (Object value : values) {
			if (value != null) {
				selectionArgs.add(value.toString());
			}
		}
		return selectionArgs.isEmpty() ? null : selectionArgs
				.toArray(new String[] {});
	}
44406
private static List<String> resolveValues(final Iterable<? extends String> values) {
        final List<String> valuesList = new ArrayList<String>();

        for(final String value : values) {
            Validate.notNull(value, "One of the specified values was null");
            valuesList.add(value);
        }

        return valuesList;
    }
724019
private static String joinAndGetValue(List<Field> fields, String sep,
                List<Object> values, Object obj, boolean isWithNullValue) {
	    return joinAndGetValueForInsert(fields, sep, null, values, obj, isWithNullValue);
    }