Java Collection to String stringify(Collection collection)

Here you can find the source of stringify(Collection collection)

Description

stringify

License

Open Source License

Declaration

public static String stringify(Collection<?> collection) 

Method Source Code

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

import java.util.Collection;

public class Main {
    public static String stringify(Collection<?> collection) {
        StringBuilder buf = new StringBuilder();
        for (Object o : collection) {
            if (buf.length() > 0)
                buf.append("\n");
            buf.append(o);/*from w  ww .  j av  a 2s .co  m*/
        }
        return buf.toString();
    }
}

Related

  1. listToString(Collection collection)
  2. listToString(Collection l, String delim)
  3. listToString(Collection objects)
  4. listToStringArray(Collection list)
  5. listToStringHelper(StringBuilder sb, String sep, Collection list)
  6. stringify(Collection collection)
  7. toStr(Collection collection)
  8. toStr(Collection elements)
  9. toString(Collection c)