Here you can find the source of weakHashMap()
Parameter | Description |
---|---|
K | Key type |
V | Value type |
public static <K, V> WeakHashMap<K, V> weakHashMap()
//package com.java2s; //License from project: Open Source License import java.util.WeakHashMap; public class Main { /**//from www. j a va 2 s . c o m * * @param <K> Key type * @param <V> Value type * @return WeakHashMap */ public static <K, V> WeakHashMap<K, V> weakHashMap() { return new WeakHashMap<>(); } }