Class LRUTypeCache.CacheMap
java.lang.Object
java.util.AbstractMap<ResolvedTypeKey, ResolvedType>
java.util.HashMap<ResolvedTypeKey, ResolvedType>
java.util.LinkedHashMap<ResolvedTypeKey, ResolvedType>
com.fasterxml.classmate.util.LRUTypeCache.CacheMap
- All Implemented Interfaces:
Serializable, Cloneable, Map<ResolvedTypeKey, ResolvedType>
- Enclosing class:
LRUTypeCache
private static final class LRUTypeCache.CacheMap
extends LinkedHashMap<ResolvedTypeKey, ResolvedType>
Simple sub-class to get LRU cache
- Since:
- 1.4
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanMethods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Field Details
-
_maxEntries
protected final int _maxEntries
-
-
Constructor Details
-
CacheMap
public CacheMap(int maxEntries)
-
-
Method Details
-
removeEldestEntry
- Overrides:
removeEldestEntryin classLinkedHashMap<ResolvedTypeKey, ResolvedType>
-