Package one.pkg.tinyutils.map
Class WeakObject2DoubleHashMap<K>
java.lang.Object
one.pkg.tinyutils.map.WeakObject2DoubleHashMap<K>
- Type Parameters:
K- the type of keys maintained by this map
A Map-like data structure that uses weakly referenced Object keys and primitive double values.
Similar to
WeakHashMap, an entry is automatically removed when its key
is no longer ordinarily reachable.-
Constructor Summary
ConstructorsConstructorDescriptionWeakObject2DoubleHashMap(int expected) WeakObject2DoubleHashMap(int expected, float f) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(K key) doublevoiddefaultReturnValue(double rv) doubledoublegetOrDefault(K key, double defaultValue) booleanisEmpty()doubledoubleintsize()
-
Constructor Details
-
WeakObject2DoubleHashMap
public WeakObject2DoubleHashMap() -
WeakObject2DoubleHashMap
public WeakObject2DoubleHashMap(int expected) -
WeakObject2DoubleHashMap
public WeakObject2DoubleHashMap(int expected, float f)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
getDouble
-
getOrDefault
-
put
-
remove
-
containsKey
-
clear
public void clear() -
defaultReturnValue
public void defaultReturnValue(double rv) -
defaultReturnValue
public double defaultReturnValue()
-