K
- the keyV
- the valuepublic class SmallLRUCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Method and Description |
---|---|
static <K,V> SmallLRUCache<K,V> |
newInstance(int size)
Create a new object with all elements of the given collection.
|
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
void |
setMaxSize(int size) |
clear, containsValue, get
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
public static <K,V> SmallLRUCache<K,V> newInstance(int size)
K
- the key typeV
- the value typesize
- the number of elementspublic void setMaxSize(int size)
protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry
in class LinkedHashMap<K,V>
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.