Java Collection to String toString(Collection setOfTests)

Here you can find the source of toString(Collection setOfTests)

Description

to String

License

Open Source License

Declaration

public static String toString(Collection setOfTests) 

Method Source Code

//package com.java2s;
/**/*from w w w  .jav a2s  .c o  m*/
 * This file is part of Spritnesse.
 * <p/>
 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.
 * <p/>
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
 * <p/>
 * You should have received a copy of the GNU Lesser General Public License along with this library.
 * <p/>
 * Copyright (c) 2014, Andrew Oxenburgh, All rights reserved.
 */

import java.util.Collection;

public class Main {
    public static String toString(Collection setOfTests) {
        String errorSet = "[\n";

        for (Object test : setOfTests) {
            errorSet += test + ", \n";
        }
        errorSet += "]";
        return errorSet;
    }
}

Related

  1. toString(Collection c)
  2. toString(Collection c)
  3. toString(Collection c, String start, String separator, String end)
  4. toString(Collection collection, String separator, int fixedLength)
  5. toString(Collection objects)
  6. toString(Collection softwareTags)
  7. toString(Collection collection)
  8. toString(Collection collection, String prefix, String suffix)
  9. toString(Collection c)