java.lang.Object
org.jruby.util.collections.WeakValuedMap<Key,Value>
- Type Parameters:
Key- keyValue- value
- All Implemented Interfaces:
Serializable,Map<Key,Value>
- Direct Known Subclasses:
WeakValuedIdentityMap
Map-like that holds its values weakly (backed by a concurrent hash map).
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()protected Map<Key, WeakValuedMap.KeyedReference<Key, Value>> newMap()Construct the backing store map for this WeakValuedMap.voidintsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
WeakValuedMap
public WeakValuedMap()
-
-
Method Details
-
put
-
get
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<Key,Value>
-
containsValue
- Specified by:
containsValuein interfaceMap<Key,Value>
-
remove
-
putAll
-
keySet
-
values
-
entrySet
-
toString
-
newMap
Construct the backing store map for this WeakValuedMap. It should be capable of safe concurrent read and write.- Returns:
- the backing store map
-