Package ghidra.util.datastruct
Class SoftCacheMap<K,V>
- java.lang.Object
-
- ghidra.util.datastruct.SoftCacheMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class SoftCacheMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
Class to manage a "soft" HaspMap that keeps its keys as soft references so they can be reclaimed if needed. Useful for caching.
-
-
Constructor Summary
Constructors Constructor Description SoftCacheMap(int cacheSize)
Constructs a new SoftCacheMap that has at most cacheSize entries.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> t)
V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
get
public V get(java.lang.Object key)
-
clear
public void clear()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
keySet
public java.util.Set<K> keySet()
-
-