Java Collection Dump dumpCollectionCollection(Collection c)

Here you can find the source of dumpCollectionCollection(Collection c)

Description

dump Collection Collection

License

Open Source License

Declaration

public static void dumpCollectionCollection(Collection<?> c) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2000, 2015 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. jav  a 2  s . co m
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

import java.util.Collection;
import java.util.Iterator;
import java.util.List;

public class Main {
    public static void dumpCollectionCollection(Collection<?> c) {
        for (Iterator<?> iter = c.iterator(); iter.hasNext();) {
            dumpCollection("", (List<?>) iter.next()); //$NON-NLS-1$
        }
    }

    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());
        }
    }
}

Related

  1. dumpCollection(Collection collection)
  2. dumpCollection(Object[] c, StringBuilder sb, int indent)
  3. dumpCollection(String msg, Collection c)
  4. dumpList(Collection list)
  5. dumpList(StringBuffer sb, Collection slist)
  6. dumpToString(Collection c, String separator)