K
- V
- public class WeakIndexCache<K,V>
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.WeakHashMap<K,java.lang.ref.WeakReference<V>> |
prefixCache |
Constructor and Description |
---|
WeakIndexCache() |
public V cache(K s, V v)
s
- the cache keyv
- the cache valuepublic boolean contains(K k)
k
- the key to checkpublic void clear()