|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary
com.prosyst.util.hash.LRUCache
public class LRUCache
LRUCache is a dictionary, that holds only the last most-used entries. The entries, which are used less, are discarded and no-longer referred. Note - that dictionary is fixed in size and is not thread-safe!
| Constructor Summary | |
|---|---|
LRUCache(int maxSize)
LRU Cache |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the elements in the cache |
java.util.Enumeration |
elements()
|
java.lang.Object |
get(java.lang.Object key)
|
boolean |
isEmpty()
|
java.util.Enumeration |
keys()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LRUCache(int maxSize)
maxSize - the maximum cache size| Method Detail |
|---|
public java.util.Enumeration elements()
elements in class java.util.DictionaryDictionary.elements()public java.util.Enumeration keys()
keys in class java.util.DictionaryDictionary.keys()public boolean isEmpty()
isEmpty in class java.util.DictionaryDictionary.isEmpty()public int size()
size in class java.util.DictionaryDictionary.size()public void clear()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in class java.util.DictionaryDictionary.put(java.lang.Object, java.lang.Object)public java.lang.Object remove(java.lang.Object key)
remove in class java.util.DictionaryDictionary.remove(java.lang.Object)public java.lang.Object get(java.lang.Object key)
get in class java.util.DictionaryDictionary.get(java.lang.Object)
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||