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 void
addToCache
(MapRetrievalCache.CacheEntry<K, V> entry) private void
addToCache
(K key, V value) (package private) void
(package private) V
(package private) V
getIfCached
(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:
get
in classMapIteratorCache<K,
V>
-
getIfCached
- Overrides:
getIfCached
in classMapIteratorCache<K,
V>
-
clearCache
void clearCache()- Overrides:
clearCache
in classMapIteratorCache<K,
V>
-
addToCache
-
addToCache
-