K - 键类型V - 值类型public class SimpleCache<K,V> extends Object implements Iterable<Map.Entry<K,V>>, Serializable
WeakHashMap实现缓存自动清理| Constructor and Description |
|---|
SimpleCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
清空缓存池
|
V |
get(K key)
从缓存池中查找值
|
Iterator<Map.Entry<K,V>> |
iterator() |
V |
put(K key,
V value)
放入缓存
|
V |
remove(K key)
移除缓存
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorCopyright © 2020. All rights reserved.