|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nodal.util.CacheMap
A Map useful for caching key/value pairs. Both the key and value side references are weak, so they do not artificially extend the lifetime of the objects stored in the Map.
Constructor Summary | |
CacheMap()
|
Method Summary | |
void |
clear()
Clear all associations out of the cache. |
java.lang.Object |
get(java.lang.Object key)
Find the object referenced by key in the Map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object val)
Place a reference to a key/value pair into the cache. |
void |
remove(java.lang.Object key)
Remove an entry from the CacheMap. |
java.util.Iterator |
values()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CacheMap()
Method Detail |
public java.lang.Object get(java.lang.Object key)
key
in the Map.
key
- the key used to look up the value
public java.lang.Object put(java.lang.Object key, java.lang.Object val)
key
- the key used to look up valueval
- the value associated with the key
public void clear()
public java.util.Iterator values()
public void remove(java.lang.Object key)
key
- the Object to be removed from the cache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |