Package com.google.common.graph
Class MapRetrievalCache<K,V>
java.lang.Object
com.google.common.graph.MapIteratorCache<K,V>
com.google.common.graph.MapRetrievalCache<K,V>
A
MapIteratorCache that adds additional caching. In addition to the caching provided by
MapIteratorCache, this structure caches values for the two most recently retrieved keys.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MapRetrievalCache.CacheEntry<K,V> private MapRetrievalCache.CacheEntry<K,V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddToCache(MapRetrievalCache.CacheEntry<K, V> entry) private voidaddToCache(K key, V value) (package private) void(package private) V(package private) VgetIfCached(Object key) Methods inherited from class com.google.common.graph.MapIteratorCache
clear, containsKey, getWithoutCaching, put, remove, unmodifiableKeySet
-
Field Details
-
cacheEntry1
-
cacheEntry2
-
-
Constructor Details
-
MapRetrievalCache
-
-
Method Details
-
get
- Overrides:
getin classMapIteratorCache<K,V>
-
getIfCached
- Overrides:
getIfCachedin classMapIteratorCache<K,V>
-
clearCache
void clearCache()- Overrides:
clearCachein classMapIteratorCache<K,V>
-
addToCache
-
addToCache
-