Package ghidra.util.datastruct
Class AbstractWeakValueMap<K,V>
java.lang.Object
ghidra.util.datastruct.AbstractWeakValueMap<K,V>
- Type Parameters:
K
- the type of keysV
- the type of values
- All Implemented Interfaces:
Map<K,
V>
- Direct Known Subclasses:
AbstractWeakValueNavigableMap
,WeakValueHashMap
Class to provide a map with weak values, backed by a given map
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
An entry for the "entrySet" method, since internally, entries are of weak-referenced values.protected static class
A weak value ref that also knows its key in the map. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
protected abstract Map<K,
AbstractWeakValueMap.WeakValueRef<K, V>> Returns the backing mapboolean
isEmpty()
keySet()
protected void
void
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
refQueue
-
-
Constructor Details
-
AbstractWeakValueMap
protected AbstractWeakValueMap()Constructs a new weak map
-
-
Method Details
-
getRefMap
Returns the backing map- Returns:
- the map
-
put
-
get
-
size
public int size() -
clear
public void clear() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
values
-
putAll
-
entrySet
-
keySet
-
remove
-
processQueue
protected void processQueue()
-