@AnyLogicInternalAPI public class LRUCache<K,V> extends java.util.LinkedHashMap<K,V>
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ACCESS_ORDER |
static int |
DEFAULT_INITITAL_CAPACITY |
static float |
DEFAULT_LOAD_FACTOR |
Constructor and Description |
---|
LRUCache(int cacheSize)
Constructs an empty
LRUCache instance with the specified cache capacity. |
LRUCache(int cacheSize,
float loadFactor,
boolean accessOrder)
Constructs an empty
LRUCache instance with the specified cache capacity, load factor and ordering mode. |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
public static final int DEFAULT_INITITAL_CAPACITY
public static final float DEFAULT_LOAD_FACTOR
public static final boolean DEFAULT_ACCESS_ORDER
public LRUCache(int cacheSize)
LRUCache
instance with the specified cache capacity.cacheSize
- cache sizepublic LRUCache(int cacheSize, float loadFactor, boolean accessOrder)
LRUCache
instance with the specified cache capacity, load factor and ordering mode.cacheSize
- the cache sizeaccessOrder
- the ordering mode - true
for access-order, false
for insertion-orderCopyright © AnyLogic North America, LLC. All Rights Reserved.