Java Map Print printMap(Map mp)

Here you can find the source of printMap(Map mp)

Description

print Map

License

Open Source License

Declaration

public static final void printMap(Map mp) 

Method Source Code

//package com.java2s;
/* *********************************************************************** *
 * project: org.matsim.*/*w w w . j  a va 2  s .  c  o m*/
 *                                                                         *
 * *********************************************************************** *
 *                                                                         *
 * copyright       : (C) 2010 by the members listed in the COPYING,        *
 *                   LICENSE and WARRANTY file.                            *
 * email           : info at matsim dot org                                *
 *                                                                         *
 * *********************************************************************** *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *   See also COPYING, LICENSE and WARRANTY file                           *
 *                                                                         *
 * *********************************************************************** */

import java.util.Iterator;

import java.util.Map;

public class Main {
    public static final void printMap(Map mp) {
        Iterator it = mp.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry pairs = (Map.Entry) it.next();
            it.remove(); // avoids a ConcurrentModificationException
        }
    }
}

Related

  1. printItems(HashMap map)
  2. printKeys(Map m)
  3. printMap(final Map msg)
  4. printMap(HashMap map)
  5. printMap(Map map)
  6. printMap(Map theMap)
  7. printMap(Map mp)
  8. printMap(Map map)
  9. printMap(Map map)