public class FasterWeakHashMap
extends java.util.WeakHashMap
| Constructor and Description |
|---|
FasterWeakHashMap(int initialCapacity)
Constructs a new, empty map with the specified initial capacity
and default load factor, which is 0.75.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
call super and clear cache
|
java.lang.ref.WeakReference[] |
listKeyReferences()
list of keys and weak references.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
call super and clear cache
|
java.lang.Object |
remove(java.lang.Object key)
call super and clear cache
|
containsKey, containsValue, entrySet, forEach, get, isEmpty, keySet, putAll, replaceAll, size, valuespublic FasterWeakHashMap(int initialCapacity)
initialCapacity - the initial capacity of the HashMap.@Nullable
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapput in class java.util.WeakHashMapkey - the key to putvalue - the value to be place.@Nullable public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Mapremove in class java.util.WeakHashMapkey - the key to removepublic void clear()
clear in interface java.util.Mapclear in class java.util.WeakHashMap@CheckReturnValue @Nonnull public java.lang.ref.WeakReference[] listKeyReferences()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.