Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.util.*;

public class Main {
    public static <T> HashMap<T, T> toMap(T[][] ts) {
        HashMap<T, T> out = new HashMap<T, T>(ts.length);
        for (int i = 0; i < ts.length; i++)
            out.put(ts[i][0], ts[i][1]);
        return out;
    }
}