Java Collection Print prettyPrintCollection(Collection collection)

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

Description

pretty Print Collection

License

Apache License

Declaration

public static <T> String prettyPrintCollection(Collection<T> collection) 

Method Source Code


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

import java.util.Collection;

public class Main {
    private static final String COMMA = ",";

    public static <T> String prettyPrintCollection(Collection<T> collection) {
        StringBuilder sb = new StringBuilder(collection.size());
        for (T element : collection) {
            sb.append(element).append(COMMA);
        }//from  w  w w. j a v a2s  . c om
        return sb.toString();
    }
}

Related

  1. prettyPrint(Collection c)
  2. prettyPrint(Collection input)
  3. prettyPrint(Collection allGroups)
  4. prettyPrintListOfClasses( Collection package1DependenciesOnPackage2)
  5. print(Collection c)
  6. print(Collection c)
  7. print(Collection collection, String delim)