All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.polaris.core.map.WeakValueHashMap Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package io.polaris.core.map;

import io.polaris.core.map.reference.WeakValueReference;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Qt
 * @since 1.8
 */
public class WeakValueHashMap extends ValueReferenceMap {

	public WeakValueHashMap(int initialCapacity, float loadFactor) {
		super(new HashMap<>(initialCapacity, loadFactor), WeakValueReference::new);
	}

	public WeakValueHashMap(int initialCapacity) {
		super(new HashMap<>(initialCapacity), WeakValueReference::new);
	}

	public WeakValueHashMap() {
		super(new HashMap<>(), WeakValueReference::new);
	}

	public WeakValueHashMap(Map t) {
		super(new HashMap<>(), WeakValueReference::new);
		putAll(t);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy