Here you can find the source of listToString(List> collection)
Parameter | Description |
---|---|
collection | the collection to convert to a string |
public static String listToString(List<?> collection)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { /**//from w ww. j a v a 2s. co m * Formats a collection of Jatalog entities, like {@link Expr}s and {@link Rule}s * @param collection the collection to convert to a string * @return A String representation of the collection. */ public static String listToString(List<?> collection) { StringBuilder sb = new StringBuilder("["); for (Object o : collection) sb.append(o.toString()).append(". "); sb.append("]"); return sb.toString(); } }