Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
// This source code is available under the terms of the Affero General Public License v3.

import java.util.IdentityHashMap;

import java.util.Map;

public class Main {
    public static <K, V> Map<K, V> makeIdentityMap() {
        return new IdentityHashMap<K, V>();
    }

    public static <K, V> Map<K, V> makeIdentityMap(int size) {
        return new IdentityHashMap<K, V>(size);
    }

    public static <K, V> Map<K, V> makeIdentityMap(Map<? extends K, ? extends V> map) {
        return new IdentityHashMap<K, V>(map);
    }
}