K
- The key typeV
- The value typepublic class LruObjectMap<K,V>
extends org.mini2Dx.gdx.utils.ObjectMap<K,V>
ObjectMap
to implement least-recently used capabilities.
Once the specified maximum capacity is reached,
the key that has been used the least is removed from the map.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CAPACITY |
Constructor and Description |
---|
LruObjectMap() |
LruObjectMap(int initialCapacity) |
LruObjectMap(int initialCapacity,
float loadFactor) |
LruObjectMap(int initialCapacity,
int maxCapacity) |
LruObjectMap(int initialCapacity,
int maxCapacity,
float loadFactor) |
LruObjectMap(org.mini2Dx.gdx.utils.ObjectMap<? extends K,? extends V> map) |
LruObjectMap(org.mini2Dx.gdx.utils.ObjectMap<? extends K,? extends V> map,
int maxCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
V |
get(K key) |
V |
get(K key,
V defaultValue) |
int |
getMaxCapacity()
Returns the maximum number of keys that can be stored in the
LruObjectMap |
V |
put(K key,
V value) |
void |
putAll(org.mini2Dx.gdx.utils.ObjectMap<? extends K,? extends V> map) |
V |
remove(K key) |
clear, containsKey, containsValue, ensureCapacity, entries, equals, equalsIdentity, findKey, hashCode, isEmpty, iterator, keys, notEmpty, shrink, toString, toString, values
public static final int DEFAULT_MAX_CAPACITY
public LruObjectMap()
public LruObjectMap(int initialCapacity)
public LruObjectMap(int initialCapacity, float loadFactor)
public LruObjectMap(int initialCapacity, int maxCapacity)
public LruObjectMap(int initialCapacity, int maxCapacity, float loadFactor)