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 voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)booleanisEmpty()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> t)Vremove(java.lang.Object key)intsize()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()
-
-