Java Collection to String toStrings(Collection c)

Here you can find the source of toStrings(Collection c)

Description

to Strings

License

Open Source License

Declaration

public static List<String> toStrings(Collection<?> c) 

Method Source Code


//package com.java2s;
// the GNU General Public License.

import java.util.ArrayList;
import java.util.Collection;

import java.util.List;

public class Main {
    public static List<String> toStrings(Collection<?> c) {
        List<String> result = new ArrayList<String>(c.size());
        for (Object e : c) {
            result.add(e.toString());//from  w w  w  . j  a v a2s .  c o  m
        }
        return result;
    }
}

Related

  1. toString(final Collection values)
  2. toString(final Collection list, final String delimiter)
  3. toString(final Collection c)
  4. toString(String[] collection, char separator)
  5. toStrings(Collection vals)
  6. toStrings(Collection objects)
  7. toStrings(final Collection stringCollection)
  8. toStringWithDelimiters(Collection objects, String delim)
  9. toStringWithSeparator(Collection collection, String separator)