|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cache
A Cache
is a collection of values that are indexed by keys and that are stored for an
unspecified amount of time (which the implementor of Cache
may further specify).
Method Summary | |
---|---|
void |
clear()
Remove all values stored in this cache. |
java.lang.Object |
get(java.lang.Object key)
If key was used in a previous call to put , this call may
return the value of that call. |
void |
put(java.lang.Object key,
java.lang.Object value)
Store value in the cache, indexed by key. |
Method Detail |
---|
void put(java.lang.Object key, java.lang.Object value)
get
with the
same (equal
) key will retrieve the same (==
) value.
Multiple calls to put
with the same key and value
are idempotent. A set of calls to put
with the same key but
different values has only the affect of the last call (assuming there were
no intervening calls to get
).
java.lang.Object get(java.lang.Object key)
put
, this call may
return the value of that call. Otherwise it returns null
.
void clear()
get
will return null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |