|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.egothor.util.Cache<K,V>
public class Cache<K,V>
This class IS synchronized.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Field Summary | |
|---|---|
int |
capacity
Maximum capacity of this object. |
| Constructor Summary | |
|---|---|
Cache(int capacity)
Constructor for the Cache object |
|
| Method Summary | |
|---|---|
void |
clear()
Description of the Method |
boolean |
containsKey(java.lang.Object key)
Description of the Method |
V |
get(java.lang.Object key)
Description of the Method |
float |
missRate()
Description of the Method |
V |
put(K key,
V value)
Description of the Method |
V |
remove(java.lang.Object key)
Description of the Method |
protected boolean |
removeEldestEntry(java.util.Map.Entry<K,V> value)
Description of the Method |
int |
size()
Description of the Method |
| Methods inherited from class java.util.LinkedHashMap |
|---|
containsValue |
| Methods inherited from class java.util.HashMap |
|---|
clone, entrySet, isEmpty, keySet, putAll, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
entrySet, equals, hashCode, isEmpty, keySet, putAll, values |
| Field Detail |
|---|
public int capacity
| Constructor Detail |
|---|
public Cache(int capacity)
capacity - Description of the Parameter| Method Detail |
|---|
public V get(java.lang.Object key)
get in interface java.util.Map<K,V>get in class java.util.LinkedHashMap<K,V>key - Description of the Parameter
public int size()
size in interface java.util.Map<K,V>size in class java.util.HashMap<K,V>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<K,V>containsKey in class java.util.HashMap<K,V>key - Description of the Parameter
public V remove(java.lang.Object key)
remove in interface java.util.Map<K,V>remove in class java.util.HashMap<K,V>key - Description of the Parameter
public V put(K key,
V value)
put in interface java.util.Map<K,V>put in class java.util.HashMap<K,V>key - Description of the Parametervalue - Description of the Parameter
public float missRate()
public void clear()
clear in interface java.util.Map<K,V>clear in class java.util.LinkedHashMap<K,V>protected boolean removeEldestEntry(java.util.Map.Entry<K,V> value)
removeEldestEntry in class java.util.LinkedHashMap<K,V>value - Description of the Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||