java.io.Serializable, Cachepublic final class CacheRandom extends GenericCache
GenericCache,
Serialized FormDEFAULT_CAPACITY| Constructor | Description |
|---|---|
CacheRandom() |
Same as:
|
CacheRandom(int capacity) |
Creates a CacheRandom instance with a given cache capacity.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addElement(java.lang.Object key,
java.lang.Object value) |
Adds a value to the cache.
|
capacity, getElement, isFull, keys, sizepublic CacheRandom(int capacity)
capacity - The capacity of the cache.public CacheRandom()
CacheRandom(GenericCache.DEFAULT_CAPACITY);
public 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.