Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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 {
    /**
     *  
     * @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());
    }
}