public class Cache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
int |
capacity
Maximum capacity of this object.
|
| Constructor and Description |
|---|
Cache(int capacity)
Constructor for the Cache object
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Description of the Method
|
boolean |
containsKey(Object key)
Description of the Method
|
V |
get(Object key)
Description of the Method
|
float |
missRate()
Description of the Method
|
V |
put(K key,
V value)
Description of the Method
|
V |
remove(Object key)
Description of the Method
|
int |
size()
Description of the Method
|
containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, replace, replaceequals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replacepublic Cache(int capacity)
capacity - Description of the Parameterpublic int size()
public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class HashMap<K,V>key - Description of the Parameterpublic float missRate()
Copyright © 2016 Egothor. All Rights Reserved.