io.polaris.core.map.WeakHashMap Maven / Gradle / Ivy
package io.polaris.core.map;
import io.polaris.core.map.reference.ReferenceType;
import java.util.HashMap;
import java.util.Map;
/**
* @author Qt
* @since 1.8
*/
public class WeakHashMap extends ReferenceMap {
public WeakHashMap(int initialCapacity, float loadFactor) {
super(new HashMap<>(initialCapacity, loadFactor), ReferenceType.WEAK);
}
public WeakHashMap(int initialCapacity) {
super(new HashMap<>(initialCapacity), ReferenceType.WEAK);
}
public WeakHashMap() {
super(new HashMap<>(), ReferenceType.WEAK);
}
public WeakHashMap(Map t) {
super(new HashMap<>(), ReferenceType.WEAK);
putAll(t);
}
}