Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

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

public class Main {

    public static <T> List<T> convertMapToList(Map<?, T> map) {
        List list = new ArrayList();
        for (Iterator localIterator = map.keySet().iterator(); localIterator.hasNext();) {
            Object o = localIterator.next();
            list.add(map.get(o));
        }
        return list;
    }
}