Java tutorial
//package com.java2s; import java.util.IdentityHashMap; import java.util.Map; public class Main { public static <K, V> IdentityHashMap<K, V> getIdentityHashMap() { return new IdentityHashMap<K, V>(); } public static <K, V> IdentityHashMap<K, V> getIdentityHashMap(int initialCapacity) { return new IdentityHashMap<K, V>(initialCapacity); } public static <K, V> IdentityHashMap<K, V> getIdentityHashMap(Map<? extends K, ? extends V> map) { return new IdentityHashMap<K, V>(map); } }