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