|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.util.LruCache
public class LruCache
Constructor Summary | |
---|---|
LruCache(int iCacheLimit)
Constructor. |
Method Summary | |
---|---|
void |
clear()
Removes all objects from this object cache. |
void |
flush()
Flushes the objects from this object cache if the object cache has exceeded the cache limit. |
java.lang.Object |
get(java.lang.Object key)
Returns the object to which this object cache maps the specified key. |
int |
getCacheLimit()
Gets the cache limit. |
int |
getSize()
Removes the specified object from this object cache. |
void |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this object cache. |
void |
remove(java.lang.Object keyToRemove)
Removes the specified object from this object cache. |
void |
setCacheLimit(int iCacheLimit)
Sets the cache limit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LruCache(int iCacheLimit)
iCacheLimit
- the limit of objects that are kept in the cache (0 = don't cache)Method Detail |
---|
public void setCacheLimit(int iCacheLimit)
iCacheLimit
- the limit of objects that are kept in the cache (0 = don't cache)public int getCacheLimit()
public java.lang.Object get(java.lang.Object key)
null if the object cache
contains no mapping for the key
public void put(java.lang.Object key, java.lang.Object value)
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified keypublic void flush()
public void clear()
public void remove(java.lang.Object keyToRemove)
keyToRemove
- the key to the object for removalpublic int getSize()
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |