Java Collection to String collectionToStringArray(Collection holder)

Here you can find the source of collectionToStringArray(Collection holder)

Description

{ method

License

Apache License

Parameter

Parameter Description
holder - non-null collection holding strings

Return

non-null array of strings }

Declaration

public static String[] collectionToStringArray(Collection holder) 

Method Source Code

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

import java.util.*;

public class Main {
    /**{ method/*from ww  w . j av a 2 s.  com*/
     @name collectionToStringArray
     @function return an array of strings from a collection
     @param holder - non-null collection holding strings
     @return  non-null array of strings
     }*/
    public static String[] collectionToStringArray(Collection holder) {
        String[] ret = new String[holder.size()];
        holder.toArray(ret);
        return (ret);
    }
}

Related

  1. collectionToString(final Collection elements, final String separator)
  2. collectionToString(final String separator, final Collection coll)
  3. collectionToString(Iterable c)
  4. collectionToString(Object[] objects)
  5. collectionToString(String prefix, Collection list)
  6. collectionToStringArray(Collection objs)
  7. collectionToStringArray(List values)
  8. collectionToStringList(Collection c)
  9. collectionToStringList(Collection c)