|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache
An interface defining the basic functions of a cache.
| Method Summary | |
|---|---|
int |
capacity()
Returns the maximum number of elements that can be cached at one time. |
Object |
get(Object key)
|
Object |
put(Object key,
Object value)
Put an object into the cache. |
int |
size()
Returns the number of elements in the cache, not to be confused with the capacity()which returns the number of elements that can be held
in the cache at one time. |
| Method Detail |
|---|
Object put(Object key,
Object value)
key - The key.value - The value to cache.
Object get(Object key)
int size()
capacity()which returns the number of elements that can be held
in the cache at one time.
int capacity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||