Java List Print print(Map> map)

Here you can find the source of print(Map> map)

Description

print

License

Apache License

Parameter

Parameter Description
vehiclesMap a parameter

Declaration

public static void print(Map<String, List<String>> map) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class Main {
    /**//from  w ww.j  a v  a 2s  . co  m
     *  
     * @param vehiclesMap
     */
    public static void print(Map<String, List<String>> map) {
        for (Iterator<Entry<String, List<String>>> iterator = map.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>) iterator.next();
            String key = entry.getKey();
            List<String> values = entry.getValue();

            System.out.println(key);

            for (String string : values) {
                System.out.println("\t" + string);
            }
        }

        //      System.out.println("Lista: " + vehicles.size());
    }
}

Related

  1. print(List A, String mode)
  2. print(List items)
  3. print(List list)
  4. print(List list)
  5. print(List list)
  6. print_int(List l)
  7. printArgument(List parameters, StringBuilder sb)
  8. printBoard(List> board)
  9. printBox(List data)

  10. HOME | Copyright © www.java2s.com 2016