Here you can find the source of dumpCollection(String msg, Collection c)
public static void dumpCollection(String msg, Collection c)
//package com.java2s; /******************************************************************************* * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/* ww w . j a v a2s . co m*/ * IBM Corporation - initial API and implementation *******************************************************************************/ import java.util.Collection; import java.util.Iterator; public class Main { public static void dumpCollection(String msg, Collection c) { System.out.println("DUMPING collection: " + msg); //$NON-NLS-1$ if (c == null) { System.out.println("null"); //$NON-NLS-1$ return; } for (Iterator iter = c.iterator(); iter.hasNext();) { System.out.println(iter.next().toString()); } } }