public static final class ApplicationContext.ResourceCacheDictionary extends Object implements Dictionary<URL,Object>, Iterable<URL>
Note that this implementation does not have a way to limiting the number of elements to contain, so the cache continues to grow; to keep it small you have to manually remove old elements from it when they are no more necessary.
Dictionary.Pair<K,V>
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(URL key)
Tests the existence of a key in the dictionary.
|
Object |
get(URL key)
Retrieves the value for the given key.
|
int |
getCount() |
Iterator<URL> |
iterator() |
Object |
put(URL key,
Object value)
Sets the value of the given key, creating a new entry or replacing the
existing value.
|
Object |
remove(URL key)
Removes a key/value pair from the map.
|
public Object get(URL key)
Dictionary
get
in interface Dictionary<URL,Object>
key
- The key whose value is to be returned.public Object put(URL key, Object value)
Dictionary
put
in interface Dictionary<URL,Object>
key
- The key whose value is to be set.value
- The value to be associated with the given key.public Object remove(URL key)
Dictionary
remove
in interface Dictionary<URL,Object>
key
- The key whose mapping is to be removed.public boolean containsKey(URL key)
Dictionary
containsKey
in interface Dictionary<URL,Object>
key
- The key whose presence in the dictionary is to be tested.public int getCount()