|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.toronto.cs.util.caching.NullCache
public class NullCache
Cache that does absolutely no caching.
Constructor Summary | |
---|---|
NullCache()
Creates new NullCache. |
Method Summary | |
---|---|
void |
clear()
Clears the cache. |
boolean |
containsKey(java.lang.Object key)
Checks whether the cache contains a value associated with the key. |
boolean |
containsValue(java.lang.Object value)
Checks whether the cache contains the specified value. |
java.util.Set |
entrySet()
Returns a Set representation of the mapping. |
java.lang.Object |
get(java.lang.Object key)
Retrieves a value with the specified key from the cache. |
boolean |
isEmpty()
Determines if the cache is empty. |
boolean |
isFull()
Determines if the cache is at its maximum capacity. |
java.util.Set |
keySet()
Gets the set of all the keys registered in the cahce. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Stores a value and assotiates a key with it. |
java.lang.Object |
remove(java.lang.Object key)
Removes a value with the specified key from the cache. |
void |
resize(int size)
Sets the maximum cache size. |
int |
size()
Returns the number of elements in cache. |
java.util.Collection |
values()
Gets a collection view of the values contained in this map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NullCache()
Method Detail |
---|
public void clear()
clear
in interface Cache
public boolean containsKey(java.lang.Object key)
containsKey
in interface Cache
key
- -- the key to look for.
public boolean containsValue(java.lang.Object value)
containsValue
in interface Cache
value
- -- the value to look for.
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface Cache
key
- -- the key associated with the value.value
- -- value to store.
public java.lang.Object get(java.lang.Object key)
get
in interface Cache
key
- -- the key associated with the value.
public java.lang.Object remove(java.lang.Object key)
remove
in interface Cache
key
- -- the key associated with the value.
public int size()
size
in interface Cache
public boolean isEmpty()
isEmpty
in interface Cache
public boolean isFull()
public java.util.Collection values()
values
in interface Cache
public java.util.Set keySet()
keySet
in interface Cache
public java.util.Set entrySet()
entrySet
in interface Cache
public void resize(int size)
resize
in interface Cache
size
- -- the maximum cache size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |