Java Collection to String collectionToStringArray(Collection objs)

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

Description

collection To String Array

License

Open Source License

Declaration

public static String[] collectionToStringArray(Collection objs) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static String[] collectionToStringArray(Collection objs) {
        if (objs == null)
            return null;
        String[] ret = new String[objs.size()];
        int idx = 0;
        for (Object o : objs) {
            ret[idx] = o.toString();//from   w  ww  .  j  av  a  2  s. c o  m
            idx++;
        }
        return ret;
    }
}

Related

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