Java Collection to List collectionToList(Iterable c)

Here you can find the source of collectionToList(Iterable c)

Description

collection To List

License

Open Source License

Declaration

public static String collectionToList(Iterable<? extends Object> c) 

Method Source Code

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

import java.util.Iterator;

public class Main {
    public static String collectionToList(Iterable<? extends Object> c) {
        StringBuffer ret = new StringBuffer();
        for (Iterator<? extends Object> itr = c.iterator(); itr.hasNext();) {
            ret.append(itr.next().toString());
            if (itr.hasNext())
                ret.append(",");
        }//from  www  .j a v a 2 s.  co  m

        return ret.toString();
    }
}

Related

  1. collectionToList(Collection theset)
  2. collectionToList(Collection source)
  3. convertCollectionToList(Collection c)
  4. convertCollectionToList(Collection coll)
  5. convertCollectionToList(Collection collection)
  6. convertCollectionToList(final Collection collection)