Lines Matching refs:collection
361 * Copies a collection of {@code Character} instances into a new array of
364 * <p>Elements are copied from the argument collection as if by {@code
365 * collection.toArray()}. Calling this method is as thread-safe as calling
368 * @param collection a collection of {@code Character} objects
369 * @return an array containing the same values as {@code collection}, in the
371 * @throws NullPointerException if {@code collection} or any of its elements
374 public static char[] toArray(Collection<Character> collection) {
375 if (collection instanceof CharArrayAsList) {
376 return ((CharArrayAsList) collection).toCharArray();
379 Object[] boxedArray = collection.toArray();