public final class CacheLRU extends GenericCache
GenericCache,
Serialized FormDEFAULT_CAPACITY| Constructor and Description |
|---|
CacheLRU()
Same as:
|
CacheLRU(int capacity)
Creates a CacheLRU instance with a given cache capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(java.lang.Object key,
java.lang.Object value)
Adds a value to the cache.
|
java.lang.Object |
getElement(java.lang.Object key) |
capacity, isFull, keys, sizepublic CacheLRU(int capacity)
capacity - The capacity of the cache.public CacheLRU()
CacheLRU(GenericCache.DEFAULT_CAPACITY);
public java.lang.Object getElement(java.lang.Object key)
getElement in interface CachegetElement in class GenericCachepublic final void addElement(java.lang.Object key,
java.lang.Object value)
addElement in interface CacheaddElement in class GenericCachekey - The key referencing the value added to the cache.value - The value to add to the cache.Copyright ? 2000-2003 Apache Software Foundation. All Rights Reserved.