|
Copyright 2002 by aragost | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.aragost.servlet.MapAdapter
A MapAdapter is used to give a Map interface to attributes, parameters etc. of objects like HttpServerletRequest, HttpSession etc. Note at the moment some methods throws UnsupportedOpetionException. And others are implemented rather naive and takes lineary time.
| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Constructor Summary | |
MapAdapter()
|
|
| Method Summary | |
protected abstract java.lang.Object |
basicGet(java.lang.String key)
Returns the value to which this map maps the specified key. |
protected abstract void |
basicPut(java.lang.String key,
java.lang.Object value)
Associates the specified value with the specified key in this map (optional operation). |
protected abstract void |
basicRemove(java.lang.String key)
Removes the mapping for this key from this map if it is present (optional operation). |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
boolean |
isEmpty()
|
protected abstract java.util.Enumeration |
keyEnumeration()
Return a enumeration with the keys of this Map. |
java.util.Iterator |
keyIterator()
This method is not part of the Map interface, but is provided as a (faster) alternative to keySet().iterator() |
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object k,
java.lang.Object value)
|
void |
putAll(java.util.Map t)
|
java.lang.Object |
remove(java.lang.Object k)
|
int |
size()
|
java.util.Collection |
values()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
| Constructor Detail |
public MapAdapter()
| Method Detail |
public void clear()
clear in interface java.util.MapMap.clear()public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.MapMap.containsKey(Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.MapMap.containsValue(Object)public java.util.Set entrySet()
entrySet in interface java.util.MapMap.entrySet()public boolean isEmpty()
isEmpty in interface java.util.MapMap.isEmpty()public java.util.Set keySet()
keySet in interface java.util.MapMap.keySet()public void putAll(java.util.Map t)
putAll in interface java.util.MapMap.putAll(Map)public java.lang.Object remove(java.lang.Object k)
remove in interface java.util.MapMap.remove(Object)public int size()
size in interface java.util.MapMap.size()public java.util.Collection values()
values in interface java.util.MapMap.values()public java.lang.Object get(java.lang.Object key)
get in interface java.util.MapThe key must be a String.
public java.lang.Object put(java.lang.Object k,
java.lang.Object value)
put in interface java.util.MapThe key must be a String.public java.util.Iterator keyIterator()
protected abstract java.util.Enumeration keyEnumeration()
protected abstract java.lang.Object basicGet(java.lang.String key)
More formally, if this map contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)
key - key whose associated value is to be returned.
java.lang.NullPointerException - key is null and this map
does not not permit null keys (optional).containsKey(Object)
protected abstract void basicPut(java.lang.String key,
java.lang.Object value)
m.containsKey(k) would return
true.))
key - key with which the specified value is to be
associated.value - value to be associated with the specified key.protected abstract void basicRemove(java.lang.String key)
(key==null ? k==null : key.equals(k)), that
mapping is removed. (The map can contain at most one such
mapping.)
key - key whose mapping is to be removed from the map.
|
Copyright 2002 by aragost | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||