|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.misc.SoftReferenceCache<T,K>
public class SoftReferenceCache<T,K>
This class implements a Cache using soft references. As soon as the garbage collector tries to remove an object, it gets removed from the cache.
Constructor Summary | |
---|---|
SoftReferenceCache()
|
Method Summary | |
---|---|
void |
cleanUp()
Cleanup the cache. |
void |
clear()
Clear the cache |
boolean |
containsKey(T key)
Checks if the cache contains a specific key |
K |
get(T key)
Get the value from the Cache |
void |
put(T key,
K object)
Put a object into the cache |
void |
remove(T key)
Remove item from cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SoftReferenceCache()
Method Detail |
---|
public K get(T key)
key
- get value for this keypublic void put(T key, K object)
key
- key for this objectobject
- object to store in the cachepublic void remove(T key)
key
- remove item that references this keypublic void clear()
public void cleanUp()
public boolean containsKey(T key)
key
- search for this key
true
if this cache contains this key
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |